// JavaScript Document
function GetXmlHttpObject(handler)
{
   var objXMLHttp=null
   if (window.XMLHttpRequest)
   {
       objXMLHttp=new XMLHttpRequest()
   }
   else if (window.ActiveXObject)
   {
       objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
   }
   return objXMLHttp
}

function stateChanged()
{
   if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
   {
           document.getElementById("txtResult").innerHTML= xmlHttp.responseText;
   }
   else {
           //alert(xmlHttp.status);
   }
}

// Will populate data based on input
function htmlData(url, qStr)
{
   if (url.length==0)
   {
       document.getElementById("txtResult").innerHTML="";
       return;
   }
   xmlHttp=GetXmlHttpObject()
   if (xmlHttp==null)
   {
       alert ("Browser does not support HTTP Request");
       return;
   }

   url=url+"?"+qStr;
   url=url+"&sid="+Math.random();
   xmlHttp.onreadystatechange=stateChanged;
   xmlHttp.open("GET",url,true) ;
   xmlHttp.send(null);
}


function showtab(divid){
		if (document.getElementById(divid).style.display = 'none')
		{
			document.getElementById(divid).style.display = 'block';
		} 
		
		
	}
function hide(divid,divid2){
document.getElementById(divid).style.display = 'none';
document.getElementById(divid2).style.display = 'none';
}
function show_hide(divid,divid2){
		document.getElementById(divid).style.display = 'block';
		document.getElementById(divid2).style.display = 'none';
	}
function show_edit(divid,divid2,divid3,divid4){
		document.getElementById(divid).style.display = 'block';
		document.getElementById(divid2).style.display = 'none';
		document.getElementById(divid3).style.display = 'block';
		document.getElementById(divid4).style.display = 'none';
	}
function nav(divid,divid2,divid3,link1,link2,link3){
		document.getElementById(divid).style.display = 'block';
		document.getElementById(divid2).style.display = 'none';
		document.getElementById(divid3).style.display = 'none';
		document.getElementById(link1).style.color = '#ccc';
		document.getElementById(link2).style.color = '#06C';
		document.getElementById(link3).style.color = '#06C';

	}

function tease(divid,div2){
		document.getElementById(divid).style.cursor = 'pointer';
		document.getElementById(div2).style.cursor = 'pointer';


		}
function remove_text(divid,div2){
		document.getElementById(divid).value = '';
		}
function tease_end(divid){
		document.getElementById(divid).style.backgroundColor = '';
		document.getElementById(divid).style.borderColor = '';
		document.getElementById(divid).style.borderStyle = '';
		document.getElementById(divid).style.borderWidth = '';

	}
tinyMCE.init({
       mode : "exact",
	   elements : "fp_details",
        theme : "advanced",
        plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

        // Theme options
        theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,

        // Skin options
        skin : "o2k7",
        skin_variant : "silver",
});

