//[OPENHTML]

function openhtml(url,lo,me,re,sc,st,to,w,h,t,l)
{
 if(t<0 || l<0){l=Math.round((screen.availWidth-w)/2);t=Math.round((screen.availHeight-h)/2)-25;}
 aw=window.open(url,'_blank','toolbar='+to+',menubar='+me+',scrollbars='+sc+',resizable='+re+',status='+st+',location='+lo+',width='+w+',height='+h+',top='+t+',left='+l);
 aw.opener=self;aw.focus();return false;
}

//[END]
//[LOAD_URL_FROM_POP]

function load(file,target)
{
 if (target != '')   target.window.location.href = file;
 else   window.location.href = file;
}

//[END]
//[COOKIES]

// Original JavaScript code by Duncan Crombie: dcrombie@chirp.com.au
// Please acknowledge use of this code by including this header.
var bikky = document.cookie;

function getCookie(name)
{
 var index = bikky.indexOf(name+"=");
 if (index == -1) return null;
 index=bikky.indexOf("=",index)+1;
 var endstr=bikky.indexOf(";",index);
 if (endstr == -1) endstr=bikky.length;
 return unescape(bikky.substring(index,endstr));
}

var today=new Date();
var expiry=new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000);
var expired=new Date(today.getTime() - 28 * 24 * 60 * 60 * 1000);

function setCookie(name,value)
{
 if (value!=null && value!="") document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
 bikky=document.cookie;
 return getCookie(name)!=null; // return false if the cookie was refused
}

function deleteCookie(frm,name) {document.cookie=name + "=null; expires=" + expired.toGMTString(); bikky=document.cookie;}

function formatCookie()
{
 var retValue="";
 with (bikky) {for (var i=0;i<length;i++) retValue += (charAt(i) != " ") ? charAt(i) : "\n"; }
 return retValue;
}

function addCookies(frm)
{
 for (i=0;i<frm.length;i++) {if ((frm.elements[i].type != "hidden") && (frm.elements[i].value != null)) { setCookie(frm.elements[i].name,frm.elements[i].value);} }
 return true;
}

function deleteCookies(frm)
{
 for (i=0;i<frm.length;i++) { if (frm.elements[i].type != "hidden") { deleteCookie(frm,frm.elements[i].name);} }
 return true;
}

function getCookies(frm)
{
 for (i=0;i<frm.length;i++)
 {
  if (frm.elements[i].type != "hidden")
  {
   var val=getCookie(frm.elements[i].name);
   if (val!=null) {frm.elements[i].value = val;}
  }
 }
 return true;
}

function updatephone(val)
{
 if(document.frm.night_phone_b!=null)
 {
  if(val=='US')document.frm.night_phone_b.maxLength=4;
  else document.frm.night_phone_b.maxLength=20;
 }
}

//[END]
//[OPENPIC]

function openpic(title,url,lo,me,re,sc,st,to,closingtime,w,h,t,l)
{
 
 if (t<0 || l<0){l=Math.round((screen.availWidth-w)/2);t=Math.round((screen.availHeight-h)/2)-25;}
 if (navigator.appName=='Netscape' && navigator.appVersion.substring(0,1)=='4')
 {
   aw=window.open('','','toolbar='+to+',menubar='+me+',scrollbars='+sc+',resizable='+re+',status='+st+',location='+lo+',width='+w+',height='+h+',top='+t+',left='+l);
   aw.document.location=url;
   return false;
 }
 else
 {
   aw=window.open('','','toolbar='+to+',menubar='+me+',scrollbars='+sc+',resizable='+re+',status='+st+',location='+lo+',width='+w+',height='+h+',top='+t+',left='+l);
   temp='<HTML><head><title>' + title + '<\/title><\/head><body style="margin:0;padding:0">';
   temp=temp+'<table border="0" cellspacing="0" cellpadding="0" style="width:100%;height:100%;background: #FFFFFF">';
   temp=temp+'<tr><td width="100%">';
   temp=temp+'<p align="center"><a href="javascript:window.close();"><img src="' + url + '" border="0"><\/a>';
   
   temp=temp+'<\/td><\/tr>';
   temp=temp+'<\/table>';
   temp=temp+'<\/body><\/HTML>';
   aw.document.write(temp);
 }
 if (closingtime!=0) aw.setTimeout('window.close()',closingtime);
}

//[END]

