var nopop=0;
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function ezipopup (linkurl) {
    window.open(linkurl, '_blank', 'width=400,height=400,scrollbars=yes,status=yes');
}
var winfeatures="width=600,height=500,scrollbars=1,resizable=1,toolbar=0,location=0,menubar=0,status=0,directories=0";

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function loadornot(popunder){
if ((get_cookie('popunder')=='')&&(nopop<1)){
loadpopunder(popunder);
		SetCookie('popunder','yes',30)
//document.cookie="popunder=yes";
}
}

function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}

function dontpop(){
nopop = 1;
}

function loadpopunder(popunder){
win2=window.open(popunder,"",'width=600,height=600,scrollbars=1,resizable=1,toolbar=0,location=0,menubar=0,status=0,directories=0');
win2.blur();
window.focus();
}

function checkdel(){
if(confirm("Are your sure your wish to delete\n\nOK=Yes - Cancel=No take me back")){return true;}else{return false;};

}

sfHover = function() {
	var sfEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

var DH = 0;
var an = 0;
var al = 0;
var ai = 0;
if (document.getElementById) {ai = 1;
 DH = 1;
}
else {
	if (document.all) {al = 1;
 DH = 1;
} else { browserVersion = parseInt(navigator.appVersion);
 if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {an = 1;
 DH = 1;
}}} 

function fd(oi,ws) {if (ws == 1) {if (ai) {return (document.getElementById(oi).style);
}
else {if (al) {return (document.all[oi].style);
} else {if (an) {return (document.layers[oi]);
}};
}} else {if (ai) {return (document.getElementById(oi));
} else {if (al) {return (document.all[oi]);
} else {if (an) {return (document.layers[oi]);
}};
}}} 

function pw() {if (window.innerWidth != null) return window.innerWidth;
 if (document.body.clientWidth != null)
return document.body.clientWidth;
 return (null);
} 

function popUp(evt,oi) {
	if (DH) {
		var wp = pw();
 		ds = fd(oi,1);
 		dm = fd(oi,0);
 		st = ds.visibility;
 		if (dm.offsetWidth) ew = dm.offsetWidth;
 		else if (dm.clip.width) ew = dm.clip.width;
 //		if (st == "visible" || st == "show") { 
//			ds.visibility = "hidden";
 //		} else { 
			if (evt.y || evt.pageY) {
				if (evt.pageY) {tv = evt.pageY + 20;
					lv = evt.pageX - (ew/4);
				} else {
					tv = evt.y + 20 + document.body.scrollTop;
 					lv = evt.x  - (ew/4) + document.body.scrollLeft;
				} 
				if (lv < 2) lv = 2;
 				else if (lv + ew > wp) lv -= ew/2;
				if (!an) {
					lv += 'px';
					tv += 'px'
				};
				ds.left = lv;
 				ds.top = tv;
			} 
			ds.visibility = "visible";
//		}
	}	
}

function popDown(evt,oi) {
	if (DH) {
		var wp = pw();
 		ds = fd(oi,1);
 		dm = fd(oi,0);
 		st = ds.visibility;
 		if (dm.offsetWidth) ew = dm.offsetWidth;
 		else if (dm.clip.width) ew = dm.clip.width;
		if (st == "visible" || st == "show") { 
			ds.visibility = "hidden";
		} 
	}	
}

function bookmark(txt,url,who) {
	var ver = navigator.appName
	var num = parseInt(navigator.appVersion)
	if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
	   document.write('<li><a  class="bookmarkicon" href="javascript:window.external.AddFavorite(\'' + url + '\',\''+who+'\');"');
	   document.write('onMouseOver=" window.status=')
	   document.write("'" + txt+"'; return true ")
	   document.write('"onMouseOut=" window.status=')
	   document.write("' '; return true ")
	   document.write('">'+ txt + '</a></li>')
	}
}