//v1.0
//Copyright 2010 Refaudit referencement. All rights reserved.
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
 
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
 
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
 
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//v2.0

 var myWidth = 0, myHeight = 0;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	var px = document.layers ? "" : "px";
	var xmlHttp
	var eType;
	
function detectSize() {
 
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  document.getElementById('obj_detaile_bg').style.height=myHeight+"px"
  document.getElementById('obj_detaile_bg').style.width=myWidth+"px"
}
 
function ShowDetaile(id){
	document.getElementById("frame_details").src="../loaders/voyant_details.asp?id="+id
	document.getElementById("obj_detaile").style.display="block";
	document.getElementById("obj_detaile_bg").style.display="block";
	document.getElementById("obj_detaile_bg").style.height=document.documentElement.clientHeight
 
		//alert(parent.document.getElementById("frame_details").src);
}
function HideInscription(){
	document.getElementById("inscription").style.display="none";
	document.getElementById("inscription_bg").style.display="none";
	document.getElementById("flashlogo").style.display="block";
	document.getElementById("imagelogo").style.display="none";
	
}
 
function HideDetaile(){
	document.getElementById("obj_detaile").style.display="none";
	document.getElementById("obj_detaile_bg").style.display="none";
}	
 
function ShowInscription(){
	document.getElementById("inscription").style.display="block";
	document.getElementById("flashlogo").style.display="none";
	document.getElementById("imagelogo").style.display="block";
	document.getElementById("inscription_bg").style.display="block";
	document.getElementById("inscription_bg").style.height=document.documentElement.clientHeight
	document.getElementById("frame_inscription").src="http://212.147.20.130/step_1hipay.asp"
}




 
function GetXmlHttpObject()
	{ 
		var objXMLHttp=null
		if (window.XMLHttpRequest)
		{
		objXMLHttp=new XMLHttpRequest()
		}
		else if (window.ActiveXObject)
		{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
		}
		return objXMLHttp
	} 
 
function GetXmlHttpObject2()
	{ 
		var objXMLHttp2=null
		if (window.XMLHttpRequest)
		{
		objXMLHttp2=new XMLHttpRequest()
		}
		else if (window.ActiveXObject)
		{
		objXMLHttp2=new ActiveXObject("Microsoft.XMLHTTP")
		}
		return objXMLHttp2
	} 
	
function GetXmlHttpObject3()
	{ 
		var objXMLHttp3=null
		if (window.XMLHttpRequest)
		{
		objXMLHttp3=new XMLHttpRequest()
		}
		else if (window.ActiveXObject)
		{
		objXMLHttp3=new ActiveXObject("Microsoft.XMLHTTP")
		}
		return objXMLHttp3
	} 
	
function GetXmlHttpObject4()
	{ 
		var objXMLHttp4=null
		if (window.XMLHttpRequest)
		{
		objXMLHttp4=new XMLHttpRequest()
		}
		else if (window.ActiveXObject)
		{
		objXMLHttp4=new ActiveXObject("Microsoft.XMLHTTP")
		}
		return objXMLHttp4
	} 
	
	
	
function showVoyants(){
	setInterval("reloadVoyants()",300000);
}
 
function RandomVoyants()
{
 
xmlHttp2=GetXmlHttpObject2()
if (xmlHttp2==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="../loaders/random.asp"
xmlHttp2.onreadystatechange=stateChanged2 
//document.getElementById("contentDiv").innerHTML = loadingContent
xmlHttp2.open("GET",url,true)
xmlHttp2.send(null)
} 
 
 
function reloadVoyants()
{
 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="../loaders/list_voyantes_online.asp?pays="+2
xmlHttp.onreadystatechange=stateChanged 
//document.getElementById("contentDiv").innerHTML = loadingContent
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
 
 
 
function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("contentDiv").innerHTML=xmlHttp.responseText 
}
} 
 
function stateChanged2() 
{ 
if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
{ 
document.getElementById("contentRandomDiv").innerHTML=xmlHttp2.responseText 
}
} 
 
 
function LeftVoyantes()
{
 
xmlHttp3=GetXmlHttpObject3()
if (xmlHttp3==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="../loaders/leftvoyantes.asp"
xmlHttp3.onreadystatechange=stateChanged3
//document.getElementById("contentDiv").innerHTML = loadingContent
xmlHttp3.open("GET",url,true)
xmlHttp3.send(null)
} 
 
 
function RightVoyantes()
{
 
xmlHttp4=GetXmlHttpObject4()
if (xmlHttp4==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="../loaders/rightvoyantes.asp"
xmlHttp4.onreadystatechange=stateChanged4
//document.getElementById("contentDiv").innerHTML = loadingContent
xmlHttp4.open("GET",url,true)
xmlHttp4.send(null)
} 
 
 
 
function stateChanged3() 
{ 
if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")
{ 
document.getElementById("contentLeftDiv").innerHTML=xmlHttp3.responseText 
}
} 
 
function stateChanged4() 
{ 
if (xmlHttp4.readyState==4 || xmlHttp4.readyState=="complete")
{ 
document.getElementById("contentRightDiv").innerHTML=xmlHttp4.responseText 
}
} 
 
 
 
function JSFX_FloatDiv(id, sx, sy)
 {	
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y)
	{this.style.left=x+px;
	this.style.top=y+px;
	};
	el.flt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		
		this.cx += (pX + this.sx - this.cx)/2;this.cy += (pY + this.sy - this.cy)/2;
		this.sP(this.cx, this.cy);
		
		
		//detectSize1()
		//alert(myWidth)
		//var x=((parseInt(pY))+(parseInt(myWidth)))
		//document.getElementById("obj_detaile").innerHTML=myWidth
		//document.getElementById("obj_detaile").style.top=(myWidth/4)+"px"
		setTimeout(this.id + "_obj.flt()", 20);
	}
	return el;
 }

