var xmlHttp = "";
var browser =	this.name = navigator.appName; //Browser Information 
var	oldTop = 0;
var newLeft   = 0;
var newHeight = "";
function AJAX2()
			{
				 document.cookie.length=0;
				 this.time = new Date();
				 try{ this.xmlHttp=new XMLHttpRequest();}
				 catch (e){  try{this.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
							 catch (e){	try{this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
										catch (e){
										 alert("Your browser does not support AJAX!");
												   return false;   
												}
										}
						  }
		
			}
function getBrowserHeightWidth(){

						clientWidth  = document.body.clientWidth ;			
						clientHeight = document.body.clientHeight;			
						clientWidth  = clientWidth / 2;
						newLeft      = clientWidth -150;
						newHeight    = eval(clientHeight - 420);	
		}
function showLoadingTblProcess(){

								
								wTbl = document.getElementById("txt");
								wTbl.style.display = 'block';
								wTbl.style.left    = newLeft + "px" ;
								wTbl.style.top     = newHeight + "px";	
	}
function hideLoadingTblProcess(){

								
								wTbl = document.getElementById("txt");
								wTbl.style.display = 'none';
		}
		
		
		
		function getTableName(idName){

			TBL = "";
			if(browser=="Netscape")
							  { 
								mainTable = document.getElementsByTagName("table");
								for(i=0 ; i < mainTable.length ; i++){
										if(mainTable[i].id == idName){ TBL = mainTable[i];}
									}
					}else{if(document.getElementById(idName))TBL = document.getElementById(idName);}
			return TBL;
	}
	
	function showTable(tblId){
	
			tbl = getTableName(tblId);
			mainTable = document.getElementsByTagName("table");
			for(i=0 ; i < mainTable.length ; i++){
					if(mainTable[i].id != ""){ mainTable[i].style.display = 'none';}
				}
			tbl.style.display = 'block';				
	}
	divId = "";
	timeOut = "";
	i=2;
function showTxt(qId){
closeTbl();
		id = document.getElementById("txt");
		document.getElementById("faqTxt").innerHTML= "";
		getBrowserHeightWidth();	  								
		id.style.display = 'block';
		
		if(document.body.scrollTop > newHeight )document.body.scrollTop = newHeight;
		getAjaxTxt(qId);
		newHeight = newHeight + 40;
		//newLeft = newLeft - 200;
		id.style.left    = newLeft + "px" ;
		id.style.top     = newHeight + "px";	
		showSlide();
	}
	function showSlide(){
		
		id = document.getElementById("txt");
		id.style.width = i+"px";
		if(i < 400){timeOut = setTimeout("showSlide()",1);i = i + 10;}
		else{clearTimeout(timeOut);i=20; timeOut = ""; showSlide2();}
		}
	function showSlide2(){
		
		id = document.getElementById("txt");
		id.style.height = i+"px";
		if(i < 350){timeOut = setTimeout("showSlide2()",1);i = i + 10;}
		else{clearTimeout(timeOut);i=2; }
		}	
	function closeTbl(){
		
		id = document.getElementById("txt");	  								
		id.style.display = 'none';
		id.style.width = "2px";
		id.style.height = "10px";
		
		}

function getAjaxTxt(qId){
	
			obj = new AJAX2();
			obj.xmlHttp.onreadystatechange=function()
			  {
				
				if (obj.xmlHttp.readyState==1)document.getElementById("faqTxt").innerHTML ="Please wait ...";
				if (obj.xmlHttp.readyState==4)document.getElementById("faqTxt").innerHTML = obj.xmlHttp.responseText ;
				}
			url="faq/faqAjax.php?faqId="+qId+"&time="+obj.time.getTime();
			obj.xmlHttp.open("GET",url,true);
			obj.xmlHttp.send(null);
	
		}
