function addEngine(name,ext,cat)
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {

    window.sidebar.addSearchEngine(
      "http://www.movierange.com/plugins/"+name+".src",
      "http://www.movierange.com/plugins/"+name+"."+ext,
      name,
      cat );
  }
  else
  {
    errorMsg(name,ext,cat);
  }
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function fullScreen(theURL) {
	window.open(theURL, 'Trailer', 'fullscreen,menubar=0, titlebar=0, toolbar=0, location=0, resizable=0, statusbar=0, status=0,scrollbars=0, top=0, left=0');
	javascript:history.go(-1);
}



function print(movie)
{
	windowHeight = 600;

	var screenWidth	 = (screen.width - 500) / 2;
	var screenHeight = (screen.height - 600) / 2;

	winUrl = "/movies/print.asp?"+movie;
	vidWin = window.open(winUrl,"print","width=500,height="+windowHeight+",toolbar=no,location=no,directories=no,status=no,titlebar=no,menubar=no,top="+screenWidth+",left="+screenHeight);
}


function report(page)
{
	windowHeight = 330;

	var screenWidth	 = (screen.width - 300) / 2;
	var screenHeight = (screen.height - 330) / 2;

	winUrl = "/report.asp?"+page;
	vidWin = window.open(winUrl,"report","width=300,height="+windowHeight+",toolbar=no,resizable=no,scrollbars=no,location=no,directories=no,status=no,titlebar=no,menubar=no,top="+screenWidth+",left="+screenHeight);
}



function popPassword(passWidth, passHeight)
{
	windowHeight = passHeight;
	var screenWidth	 = (screen.width - passWidth) / 2;
	var screenHeight = (screen.height - passHeight) / 2;

	winUrl = "/password.asp";
	vidWin = window.open(winUrl,"vidPopRd2","width="+passWidth+",height="+windowHeight+",toolbar=no,resizable=no,scrollbars=no,location=no,directories=no,status=no,titlebar=no,menubar=no,top="+screenWidth+",left="+screenHeight);
}




function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}


var cX = 0; var cY = 0; var rX = 0; var rY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }
function AssignPosition(d) {
if(self.pageYOffset) {
	rX = self.pageXOffset;
	rY = self.pageYOffset;
	}
else if(document.documentElement && document.documentElement.scrollTop) {
	rX = document.documentElement.scrollLeft;
	rY = document.documentElement.scrollTop;
	}
else if(document.body) {
	rX = document.body.scrollLeft;
	rY = document.body.scrollTop;
	}
if(document.all) {
	cX += rX; 
	cY += rY;
	}
d.style.left = (cX-20) + "px";
d.style.top = (cY+10) + "px";
}

function HideContent(d) {
	if(d.length < 1) { return; }
	document.getElementById(d).style.display = "none";
}

function ShowContent(d) {

	if(d.length < 1) { return; }
	var dd = document.getElementById(d);
	AssignPosition(dd);
	dd.style.display = "block";
}

function ReverseContentDisplay(d) {
	if(d.length < 1) { return; }
	
	var dd = document.getElementById(d);
	AssignPosition(dd);
	if(dd.style.display == "none") { 
		dd.style.display = "block"; 
	}
	else { 
		dd.style.display = "none"; 
	}
}

