function change_author(id) {
	if(id == "new") {
		var item = get_item(id);
		item.style.display = "none";
		var item = get_item("from_list");
		item.style.display = "";		
		
	}
	else if(id == "from_list") {
		
		var item = get_item(id);
		item.style.display = "none";		
		var item = get_item("new");
		item.style.display = "";		
		
	}
	else {
		
		var id = "new";
		var item = get_item(id);
			item.style.display = "none";		
			
		var id = "from_list";
		var item = get_item(id);
			item.style.display = "none";				
	}
}

function change_display(id) {

	if(id == "qt_rand_div") {
		var item = get_item(id);
		item.style.display = "";
		var item = get_item("qt_fixed_div");
		
		item.style.display = "none";		
		
	}
	else if(id == "qt_fixed_div") {
		
		var item = get_item(id);
		item.style.display = "";		
		var item = get_item("qt_rand_div");
		item.style.display = "none";		
		
	}
	else {
		
		var id = "qt_rand_div";
		var item = get_item(id);
			item.style.display = "none";		
			
		var id = "qt_fixed_div";
		var item = get_item(id);
			item.style.display = "none";				
	}
}

function check_quote_display() {
	var item = get_item("last_quote");
	if(item.checked) {
		change_display();
	}
	var item = get_item("rand_quote");
	if(item.checked) {
		change_display('qt_rand_div');
	}
	var item = get_item("fixed_quote");
	if(item.checked) {
		change_display('qt_fixed_div');
	}		
}



function deleteQuote(targ, url) {
	
	var handleSuccess = function(o){
	
		if(o.responseText !== undefined){

		}
	}

	var callback =
	{
	  success:handleSuccess,
	  failure: handleFailure,
	  argument: ['foo','bar']
	};
	
	
	var handleFailure = function(o) {
		
	}
	sUrl = url + "delete/" + targ + "/";
	
	var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback);
	
}


function removeHTMLTags(txt){
 	
 		var strInputCode = txt;
 		/* 
  			This line is optional, it replaces escaped brackets with real ones, 
  			i.e. < is replaced with < and > is replaced with >
 		*/	
 	 	strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
 		 	return (p1 == "lt")? "<" : ">";
 		});
 		var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
 		return strTagStrippedText;	
   // Use the alert below if you want to show the input and the output text
   //		alert("Input code:\n" + strInputCode + "\n\nOutput text:\n" + strTagStrippedText);	

}


