// HIDE LAYER ONLOAD
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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// OPEN PICTURE WINDOW FEVER v4.01
function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

// OPEN WINDOW
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//POPUP WINDOW ONCE
var ckTemp = document.cookie;

function setCookie(name, value) { 
 if (value != null && value != "")
  document.cookie=name + "=" + escape(value) + ";";
 ckTemp = document.cookie;
 }
  
function getCookie(name) { 
 var index = ckTemp.indexOf(name + "=");
 if(index == -1) return null;
  index = ckTemp.indexOf("=", index) + 1;
 var endstr = ckTemp.indexOf(";", index);
 if (endstr == -1) endstr = ckTemp.length;
 return unescape(ckTemp.substring(index, endstr));
 }
  
function checkCookie() {
 var temp = getCookie("popup");
 if(!temp==1) {
  setCookie("popup",1);
  window.open('popup15.htm','pop1','directories=no, scrollbars=no, resizeable=yes,width=380,height=502,left=10,top=10')
   }
}

// POPUP ALERT
function GP_popupConfirmMsg(msg) { //v1.0
  document.MM_returnValue = confirm(msg);
}

// SET CSS
function P7_setCSS(d, theStyle) { //v1.8 by PVII
  var expDays=parseInt(d),path = "/";
  var expdate = new Date();
  expdate.setTime(expdate.getTime() + (expDays*24*60*60*1000));
  document.cookie = "p7styler=" + escape (theStyle) + "; expires=" + expdate.toGMTString() +'; path=' + path;
  top.location.reload();
}

// SET CSS COOKIE
function P7_getCSS(a) { // v1.8 by PVII
  var i=0,j=0,e=0,theSheet="";
  a=a+"=",t="<",u="LINK";
  var alen=a.length,clen=document.cookie.length;
  while (i < clen) {
   j=i+alen;
   if(document.cookie.substring(i,j)==a) {
     e = document.cookie.indexOf(";",j);
     if (e==-1) {e=clen}
     theSheet = unescape(document.cookie.substring(j,e));
     document.write(t+u+' rel="stylesheet" type="text/css" href="' + theSheet + '">');
     break;}
   else {i=document.cookie.indexOf(" ",i)+1;
     if (i==0) break; } }
}
P7_getCSS('p7styler');
