function searchon(obj) {
	if (obj.value == ' SEARCH') {obj.value='';}
}
function searchoff(obj) {
	if (obj.value == '') {obj.value=' SEARCH';}
}
function chkeywords(objx) {
   	if (eval(objx) == " SEARCH") {alert("The search box is empty.  Please enter one or more words in the box"); return false;} else {return true;}
}
function disp(object) {
    if (document.all) {
	  if (document.all[object].style.display=='none') {document.all[object].style.display='';} else {document.all[object].style.display='none';}
  }
}
function dispx(object) {
    if (document.all) {
	   if (document.objectp) {document.all[document.objectp].style.display='none';} 
	   if (document.all[object].style.display=='none') {document.all[object].style.display='';} else {document.objectp=object;}
  }
}
function d() {}

function chkx(x) {
   y = x.src
   if (y.indexOf("off.gif") != -1) {x.src="../images/check_on.gif";} else {x.src="../images/check_off.gif";}
   return;
   }
function ph(ph) {alert("Call  "+ph); return} 
function eml(em1,em2) {
  if (confirm(em2+"'s email address is:\r\r  "+em1+" \r\rWould you like to contact the "+em2+" now?")) {javascript: location.href="mailto:"+em1;} else {};
  return
}
function getcookie (Name) 
{
   var search = Name + "="
   if (document.cookie.length > 0)  
      {offset = document.cookie.indexOf(search) 
       if (offset != -1)  
         {offset += search.length 
          end = document.cookie.indexOf(";", offset) 
          if (end == -1) 
            end = document.cookie.length
         return unescape(document.cookie.substring(offset, end))
         } 
       }
	 {return 0;}
}
function mp(s,ref)
{ 
	cooky = getcookie("ccooky");
	if (cooky == 0) {cooky="0,,0"}
	cookyw = getcookie("ccookyw");
	if (cookyw == 0) {cookyw="0::0"}
	switch (s) 
	{case ("on"):
		if (cooky.indexOf(","+ref+",")== -1) 
			{cooky=cooky.replace(",0",","+ref+",0")}
	  	cooky=cooky.replace(",,",",");
		stat="added to";
	 break
	 case ("off"):
		if (cooky.indexOf(","+ref+",")!= -1)
			{cooky=cooky.replace(","+ref+",",",")};
		if (cooky == "0,0") {cooky = "0,,0"};
		stat="removed from";
	 break
	 case ("del"):
	  	cooky = "0,,0";
	  	break
	}
	yearsexpire = 5;
  	today = new Date(); expires = new Date();
	expires.setTime(today.getTime()+1000*60*60*24*365*yearsexpire);
	xdate = expires.toGMTString();
	cln = escape(cooky).length+escape(cookyw).length;
	cooky = escape(cooky);
	if (cln <= 3900) {document.cookie="ccooky="+ cooky +"; expires="+xdate+"; path=/"; location.reload();} else {alert("Exceeded My Profile Limits. You must remove links to make room for new ones "+cln);}
	//window.status = "The selected link has been "+stat+" 'My Profile'";   

}	
function mpw(s,ref)
{ 
	ref = ref.replace("http://","");    
	ref = ref.replace(":","");
	ref = ref.replace("'","");
	ref = ref.replace('"','');
	ref = ref.replace("+","");
	if (ref == "www.") {ref=""};
	if (ref == "www") {ref=""};
	p = ref.indexOf("?");
	if (p != -1) {ref = ref.substring(0,p);}
	cookyw = getcookie("ccookyw");
	if (cookyw == 0) {cookyw="0::0"};
	cooky = getcookie("ccooky");
	if (cooky == 0) {cooky="0,,0"}
	switch (s) 
	{case ("on"):
		if (cookyw.indexOf(":"+ref+":")== -1) 
			{cookyw=cookyw.replace(":0",":"+ref+":0")}
	  	cookyw=cookyw.replace("::",":");
		stat="added to";
	 break
	 case ("off"):
		if (cookyw.indexOf(":"+ref+":")!= -1)
			{cookyw=cookyw.replace(":"+ref+":",":")};
		if (cookyw == "0:0") {cookyw = "0::0"};
		stat="removed from";
	  break
	 case ("del"):
	  	cookyw = "0::0";
	  	break
	}
	yearsexpire = 5;
  	today = new Date(); expires = new Date();
	expires.setTime(today.getTime()+1000*60*60*24*365*yearsexpire);
	xdate = expires.toGMTString();
	cln = escape(cookyw).length+escape(cooky).length;
	cookyw = escape(cookyw);
	if (cln <= 3900) {document.cookie="ccookyw="+ cookyw +"; expires="+xdate+"; path=/"; location.reload();} else {alert("Exceeded My Profile Limits. You must remove links to make room for new ones "+cln);}
	//window.status = "The selected link has been "+stat+" 'My Profile'";
	
}	
function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.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; }
}

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);