var is_nav4up;
var is_ie4up;

function fillDiv(url){
	document.getElementById('myDiv').innerHTML=tempData.document.body.innerHTML;
	return true;
}

function GetActorData(performer) {
	document.getElementById('myDiv').InnerHTML = "";
	// file = "more_info.php?id="+ performer;
	file = performer;
	//alert(file);
	writetxt(file);
}

function fO() {
	document.getElementById('myDiv').InnerHTML = "";
	writetxt(0)
}

function fetishOff() {
	document.getElementById('myDiv').InnerHTML = "";
	writetxt(0)
}

var dofade=false;     // ENABLES FADE-IN EFFECT FOR IE4+ AND NS6 ONLY
var center=false;     // CENTERS THE BOX UNER THE MOUSE, OTHERWISE DISPLAYS BOX TO THE RIGHT OF THE MOUSE
var centertext=false; // CENTERS THE TEXT INSIDE THE BOX. YOU CAN'T SIMPLY DO THIS VIA STYLE BECAUSE OF NS4.
var flag=true;        // OTHERWISE, TEXT IS LEFT-JUSTIFIED. 

////////////////////////////// NO NEED TO EDIT BEYOND THIS POINT //////////////////////////////////////


function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var NS4 = (navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? true : false;
var IE4 = (document.all && !document.getElementById)? true : false;
var IE5 = (document.getElementById && document.all)? true : false;
var NS6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var W3C = (document.getElementById)? true : false;
var w_y, w_x, myDiv, boxheight, boxwidth;
var ishover=false;
var isloaded=false;
var ieop=0;
var op_id=0;

function getwindowdims(){
w_y=(NS4||NS6||window.opera)? window.innerHeight : (IE5||IE4)? document.body.clientHeight : 0;
w_x=(NS4||NS6||window.opera)? window.innerWidth : (IE5||IE4)? document.body.clientWidth : 0;
}

function getboxwidth(){
if(NS4)boxwidth=(myDiv.document.width)? myDiv.document.width : myDiv.clip.width;
if(IE5||IE4)boxwidth=(myDiv.style.pixelWidth)? myDiv.style.pixelWidth : myDiv.offsetWidth;
if(NS6)boxwidth=(myDiv.style.width)? parseInt(myDiv.style.width) : parseInt(myDiv.offsetWidth);
}

function getboxheight(){
if(NS4)boxheight=(myDiv.document.height)? myDiv.document.height : myDiv.clip.height;
if(IE4||IE5)boxheight=(myDiv.style.pixelHeight)? myDiv.style.pixelHeight : myDiv.offsetHeight;
if(NS6)boxheight=parseInt(myDiv.offsetHeight);
}

function movemyDiv(x,y){
if(NS4)myDiv.moveTo(x,y);
if(W3C||IE4){
myDiv.style.left=x+'px';
myDiv.style.top=y+'px';
}}

function getpagescrolly(){
if(NS4||NS6)return window.pageYOffset;
if(IE5||IE4)return ietruebody().scrollTop;
}

function getpagescrollx(){
if(NS4||NS6)return window.pageXOffset;
if(IE5||IE4)return ietruebody().scrollLeft;
}

function writeindiv(text){
if(NS4){
myDiv.document.open();
myDiv.document.write(text);
myDiv.document.close();
}
if(W3C||IE4)myDiv.innerHTML=text;
}

//**** END UTILITY FUNCTIONS ****//

function fillDiv(){
	document.getElementById('myDiv').innerHTML=tempData.document.body.innerHTML;
	return true;
}
    
function writetxt(file){
if(isloaded){
	if(file!=0){
		ishover=true;
		//file = "/performerpop/" + performer + ".html"
		
		//	document.getElementById('myDiv').innerHTML = file +"<iframe frameborder=0 hspace=0 vspace=0 marginheight=0 marginwidth=0 scrolling=no src='" + file + "' style=left=0; top=0; background-color:#FFFFFF; filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=6, OffY=6, Color='#55000000', Positive='true'); width=180; height=80; border='3px solid #000000'; font-family:verdana; color:#000000; padding: 0; margin: 0px 0 0 0></iframe>";
		document.getElementById('myDiv').innerHTML = '<img  src="'+file+'" >';
		
		getboxheight();
		if((W3C || IE4) && dofade){
		ieop=0;
		incropacity();
		}}else{
		if(NS4)myDiv.visibility="hide";
		if(IE4||W3C){
			if(dofade)clearTimeout(op_id);
			myDiv.style.visibility="hidden";
		}
		writeindiv('');
		ishover=false;
		}
	}
}





function moveobj(evt){
if(isloaded && ishover){
margin=(IE4||IE5)? 1 : 23;
if(NS6)if(document.height+27-window.innerHeight<0)margin=15;
if(NS4)if(document.height-window.innerHeight<0)margin=10;
//mx=(NS4||NS6)? evt.pageX : (IE5||IE4)? event.clientX : 0;
//my=(NS4||NS6)? evt.pageY : (IE5||IE4)? event.clientY : 0;
if (NS4){
mx=evt.pageX
my=evt.pageY
}
else if (NS6){
mx=evt.clientX
my=evt.clientY
}
else if (IE5){
mx=event.clientX
my=event.clientY
}
else if (IE4){
mx=0
my=0
}

if(NS4){
mx-=getpagescrollx();
my-=getpagescrolly();
}
xoff=(center)? mx-boxwidth/2 : mx+5;
yoff=(my+boxheight+30-getpagescrolly()+margin>=w_y)? -15-boxheight: 30;
movemyDiv( Math.min(w_x-boxwidth-margin , Math.max(2,xoff))+getpagescrollx() , my+yoff+getpagescrolly());
if(NS4)myDiv.visibility="show";
if(W3C||IE4)myDiv.style.visibility="visible";
}}

if(NS4)document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=moveobj;
window.onload=function(){
  myDiv=(NS4)? document.layers['myDiv'] : (IE4)? document.all['myDiv'] : (W3C)? document.getElementById('myDiv') : null;
  getboxwidth();
  getboxheight();
  getwindowdims();
  isloaded=true;
  if((W3C || IE4) && centertext)myDiv.style.textAlign="center";
  if(W3C)myDiv.style.padding='4px';
  if(IE4 || IE5 && dofade)myDiv.style.filter="alpha(opacity=0)";
  }
window.onresize=getwindowdims;
