var xmlhttp=false;    //  ###############    The  MAGIC object ;)
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
  xmlhttp = new XMLHttpRequest();
}



/////////////////////    The Main Man
function doreq (url){
	if (!xmlhttp) {
		  //alert("No magic in this browser, sorry")
		  return (0);
	}
	else{
		c = 0
		resp = ""
	   //alert(url)
	
		xmlhttp.open("POST",url ,true);
		
		 xmlhttp.onreadystatechange = kzamback
		 t = new Date()
		 xmlhttp.send(null)
		 return(1);
	}
}
function kzamback() {
			 
			  if (xmlhttp.readyState==4) {
				   			//alert("doreq return\n" + xmlhttp.responseText)			   
					//document.getElementById("dvlynam").innerHTML = xmlhttp.responseText
					   fnclf = xmlhttp.responseText.match(/FN:([^:]+)::([^\|]*)/)
					   fncla = xmlhttp.responseText.match(/ALT:([^\|]+)/)
					   if(fnclf && fnclf[1] && fnclf[2]){
							//alert(fnclf[2])
							eval(fnclf[1] + "(\"" + fnclf[2] + "\")")
							return 0
					   }
					   else if(fncla && fncla[1]){
							eval("alert(\"" + fncla[1].replace(/<br>/g,"\\n") + "\")")
							return 0
					   }
					   else{
						  eval(xmlhttp.responseText)
					}
				   //
			  }
		 }

function kzam(fnc, arg){
		doreq ( "ftvl.php?fnc=" + fnc + "&arg=" + escape(arg))
		return 1
}
//#######   Spacer object
function mkdbldv(dad,nl){
	
	//var nd = document.createElement("div")
	if(!nl){
		if(!dad.sf){
			var ndsf = document.createElement("div")
			var sfn = dad.appendChild (ndsf)
			sfn.style.clear = "both"
			sfn.style.width = "1px"
			dad.sf = sfn
		}
		var nd = document.createElement("div")
		//alert(dad.sf.style.clear + "\n" + (nd ? "yup" : "nah"))
		var sfoo = dad.sf
		var mtxo = dad.insertBefore(nd, sfoo)
		
		
		mtxo.style.styleFloat= "left"
		mtxo.style.cssFloat= "left"
	}
	else{
		var nd = document.createElement("div")
		var mtxo = dad.appendChild (nd)
		mtxo.style.clear = "both"
	}
	mtxo.pa = this
	//txt div
	var nd = document.createElement("div")
	var mtxi = mtxo.appendChild (nd)
	//alert("in mkdiv all done")
	//mtxi.innerHTML = "."
	mtxi.pa = this
	this.txi = mtxi
	this.txo = mtxo
	return 1
}
function scoot(str){
	window.location = str
}