// JavaScript Document
	function ajaxFunction(previous)
	{
		var xmlHttp;
		try {
			// Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();
		 }
		catch (e)	{
		  // Internet Explorer
		  try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
		  catch (e)
			{
				try	{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				 }
				catch (e)	{
					  alert("Your browser does not support AJAX!");
					  return false;
				}
			}
		 }
		 xmlHttp.onreadystatechange=function()
   		 {
			if(xmlHttp.readyState==4)
			  {
				document.getElementById('testimonial').innerHTML = xmlHttp.responseText;
			  }
    	 }
		 
		 xmlHttp.open("GET","newtestimonial.php?id="+previous,true);
		 xmlHttp.send(null);
	  }
	 
	
	var dropdownelement;
	var timeout;
	function dropdown(current) {
		//document.getElementById('dropdown'+current).style.left = current.offsetLeft;
		removeDropdown();
		dropdownelement = document.getElementById('dropdown'+current);
		dropdownelement.style.left = document.getElementById('dropdown'+current).offsetLeft  + 'px';
		dropdownelement.style.visibility = 'visible';
		if(timeout) clearTimeout(timeout);
		timeout = window.setTimeout(removeDropdown,1000);
	}
	
	function removeDropdown() {
		//document.getElementById('dropdown'+current).style.left = current.offsetLeft;
		if(dropdownelement) {
			dropdownelement.style.visibility = 'hidden';
		}
	}
	
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	
	function fixPNG(myImage) 
	{
		if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
		{
		   var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
		   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
		   var imgTitle = (myImage.title) ? 
						 "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
		   var imgStyle = "display:inline-block;" + myImage.style.cssText
		   var strNewHTML = "<span " + imgID + imgClass + imgTitle
					  + " style=\"" + "width:" + myImage.width 
					  + "px; height:" + myImage.height 
					  + "px;" + imgStyle + ";"
					  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
					  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
		   myImage.outerHTML = strNewHTML	  
		}
	}
	
	function startList() 
	{
		if (document.all&&document.getElementById("nav")) {
			navRoot = document.getElementById("nav");
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						//this.className+=" over";
						this.className += " over";
		 			 }
		  			node.onmouseout=function() {
		  			this.className=this.className.replace(" over", "");
		   			}
		   		}
		  }
		}
	}
//window.onload=startList;

function contact(value) {
	//document.getElementById('contactGeneral').style.visibility = 'hidden';
	document.getElementById('contactComplex').style.visibility = 'hidden';
	//document.getElementById('contactGeneral').style.display = 'none';
	document.getElementById('contactComplex').style.display = 'none';
	document.getElementById(value).style.visibility = 'visible';
	document.getElementById(value).style.display = 'block';
}

function hideContact() {
	document.getElementById('contactSuccess').style.visibility = 'hidden';
}

function showContact() {
	document.getElementById('contactSuccess').style.visibility = 'visible';
}

function init() {
	fixPNG(document.pnglogo);
	fixPNG(document.pngcar);
	startList();
	ajaxFunction(-1);
}

window.onLoad =	init();
	


