var idTimeout;
var varCursor = '';

function ietruebody()
{
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function followcursor()
{
	//curscroll.style.left=ietruebody().scrollLeft+event.clientX+10;
	//curscroll.style.top=ietruebody().scrollTop+event.clientY-10;

	if ( event.clientX > 450 )
	{
		curscroll.style.left=event.clientX-330;
	}else{
		curscroll.style.left=ietruebody().scrollLeft+event.clientX+10;
	}


	if ( event.clientY < ( document.body.clientHeight/2 ) )
	{
		curscroll.style.top = (ietruebody().scrollTop + event.clientY);
	} else {
		curscroll.style.top = (ietruebody().scrollTop + event.clientY) - 300;
	}	
	
	//self.status = event.clientX;
	
}

function followcursor_end()
{
	if (document.all) {
		curscroll.style.visibility="hidden";
	}
}

function followcursor_start(par)
{
	if (document.all) {
		curscroll.style.visibility="visible";
		document.onmousemove=followcursor;
		curscroll.innerHTML = varCursor;		
	}
}


if (document.all) 
{
	document.write('<span name="curscroll" id="curscroll" style="z-index:100000;position:absolute;border:1px solid black;font-size:14px;background-color:white;visibility:hidden"></span>')
}

function fretof( sret )
{

	 var v = sret.split('|');
	 var p0=v[0]; //function invocada
	 var p1=v[1]; //retorno -1 error
	 var p3=v[2]; //

	
	if ( p0 == 'fObtenerFotoInicial')
	{
		varCursor = '<table border=0 cellspacing=4 cellpadding=4>';
		varCursor += '<tr><td align=center><img class=img1 src="http://www.bairesgirls.com.ar/wi/ef/' + p3 + '"></td></tr>';
		varCursor += '<tr><td align=center>Hace click para ver todas las fotos</td></tr>';
		varCursor += '</table>';
		followcursor_start();
	}
	self.status = '';
}

function of2 ( iIdElemento )
{
	jsrsExecute("/newtemplateweb/rs.php", fretof, "fObtenerFotoInicial", iIdElemento ); 
	window.clearTimeout(idTimeout);
}
function of ( iIdElemento )
{
	idTimeout = window.setTimeout( "of2('" + iIdElemento + "')", 500);
}


function ov2 ( iIdElemento )
{
	jsrsExecute("newtemplateweb/rs.php", fretof, "fIncV", iIdElemento ); 
	window.clearTimeout(idTimeout);
}
function ov1 ( iIdElemento )
{
	idTimeout = window.setTimeout( "ov2('" + iIdElemento + "')", 100);
}


function e()
{
	followcursor_end();
	window.clearTimeout(idTimeout);
}


