// JavaScript Document
function insertAdManager()
{
document.write(' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="717" height="87">');
      document.write('<param name="movie" value="ad_manager/top_ad_manager.swf" />');
      document.write('<param name="quality" value="high" />');
	  document.write('<param name="wmode" value="transparent">');
      document.write('<embed src="ad_manager/top_ad_manager.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="717" height="87"></embed>');
      document.write('</object>');
}       


function insertContactBanner()
{
document.write(' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="212" height="272">');
      document.write('<param name="movie" value="contact_banner/contact_banner.swf" />');
      document.write('<param name="quality" value="high" />');
	  document.write('<param name="wmode" value="transparent">');
      document.write('<embed src="contact_banner/contact_banner.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="212" height="272"></embed>');
      document.write('</object>');
}       



// LIVE SEARCH 
var xmlHttp = "";

function showResult(str){
	if (str.length <= 1) { 
		document.getElementById("livesearch"). innerHTML="";
	 	document.getElementById("livesearch"). style.border="0px";
		document.getElementById("livesearch").style.visibility="hidden";
		//document.getElementById("livesearch"). style.padding="0px";
	 	return;
	}
	else { 
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null){
			alert ("Browser does not support HTTP Request")
			return;
		} 
		var url="livesearch2.php"
		url=url+"?q="+str
		url=url+"&sid="+Math.random()
		xmlHttp.onreadystatechange=stateChanged 
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}
} 

function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ 
		if(xmlHttp.responseText !== ""){
		document.getElementById("livesearch").innerHTML=xmlHttp.responseText;
		document.getElementById("livesearch").style.border="1px solid #A5ACB2";
		document.getElementById("livesearch").style.visibility="visible";
		//document.getElementById("livesearch").style.padding="2px";
		}
	} 

}

function GetXmlHttpObject(){
	var xmlHttp=null;
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e){
 	// Internet Explorer
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}