function showUserPass(){
	if (document.getElementById('insp').style.display == 'none') {
		document.getElementById('insp').style.display = '';
	}
}

function hideUserPass(){
	if (document.getElementById('insp').style.display == '') {
		document.getElementById('insp').style.display = 'none';
	}
}

var divw=0;
var divh=0;

if (document.getElementById || document.all)
	document.write('<div id="imgtrailer" style="position:absolute;visibility:hidden; z-index: 100;"></div>')



function gettrailobject()
	{
	if (document.getElementById)
		return document.getElementById("imgtrailer")
	else if (document.all)
		return document.all.trailimagid
	}

function gettrailobj()
	{
	if (document.getElementById)
		return document.getElementById("imgtrailer").style
	else if (document.all)
		return document.all.trailimagid.style
	}

function PopDown()
	{


		document.onmousemove='';
		gettrailobj().visibility="hidden";
	}

function PopUp(location,imgtitle,thw,thh){



		var imgsize = '';
		gettrailobj().left="-500px";
		divthw = parseInt(thw) + 2;
		smthw = parseInt(thw) + 2;
		halfthh = 50;
		halfthh = Math.ceil(parseInt(thh)/2);
		topx = halfthh - 9;
		smthh = parseInt(thh) + 2;
		gettrailobject().innerHTML = '<div style="background-color: #FFAA00; layer-background-color: #e6ebef; border: 1px none #808080; padding:10px; width:'+divthw+'px;z-index: 100;"><div style="background-color: #FFAA00; layer-background-color: #FFFFFF; border: 1px solid #808080;"><img src="'+location+'" border="0" width="'+thw+'" height="'+thh+'"><div style="padding:3px">'+imgtitle+'<br></div></div></div>';
		gettrailobj().visibility="visible";
		divw = parseInt(thw);
		divh = parseInt(thh);
		document.onmousemove=followmouse;

}

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

function followmouse(e)
	{
	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(document.body.offsetHeight, window.innerHeight)
if(typeof e != "undefined")
	{
	if(docwidth < 15+e.pageX+divw)
		xcoord = e.pageX-divw-5;
	else
		xcoord = 15+e.pageX;
	if(docheight < 15+e.pageY+divh)
		ycoord = 15+e.pageY-Math.max(0,(divh + e.pageY - docheight - truebody().scrollTop - 30));
	else
		ycoord = 15+e.pageY;
	}
else if (typeof window.event != "undefined")
	{
	if(docwidth < 15+truebody().scrollLeft+event.clientX+divw)
		xcoord = truebody().scrollLeft-5+event.clientX-divw;
	else
		xcoord = truebody().scrollLeft+15+event.clientX;

	if(docheight < 15+truebody().scrollTop+event.clientY+divh)
		ycoord = 15+truebody().scrollTop+event.clientY-Math.max(0,(divh + event.clientY - docheight - 30));
	else
		ycoord = truebody().scrollTop+15+event.clientY;
	}
	gettrailobj().left=xcoord+"px"
	gettrailobj().top=ycoord+"px"
	}

function getURLParam(strParamName){
  var strReturn = "";
  var strHref = window.location.href;
  if ( strHref.indexOf("?") > -1 ){
    var strQueryString = strHref.substr(strHref.indexOf("?"));
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
      if (
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
  return unescape(strReturn);
} 

