function echomail(acc,dom){document.write(acc+"@"+dom)}
function mail2(acc,dom){location.href="mailto:"+acc+"@"+dom}


function showWin(u,n)
{f=(n=="cnh2"?"top=20,left=20":"top=0,left=0")
  +",width=750,height=600,location=no,menubar=no,titlebar=no,status=no,toolbar=no,"
  +"scrollbars=yes,"
  +"resizable=yes";
 if(typeof(n)=="undefined") n="cnh";
 hwnd=window.open(u,n,f);
 //hwnd.focus();
}
function popup(url){showWin(url,"cnh")}



function vContactForm()
{var msg="";
 var obj;
 var form=document.f_contact;
 form.submit.disabled=true;
 if(trim(form.vName.value)=="")
   {msg="Please enter your name.";
    obj=form.vName;
   }
 else if(!emailCheck(form.vEmail.value))
   {msg="Please provide a valid e-mail address where we can send a reply.";
    obj=form.vEmail;
   }
 else if(trim(form.vSubject.value)==""||form.vSubject.value[0]=="-")
   {msg="Please choose a subject for your message.";
    obj=form.vSubject;
   }
 else if(trim(form.vMsg.value)=="")
   {msg="Please type in the message you want to send to us.";
    obj=form.vMsg;
   }
 if(msg!="")
   {alert(msg);
    obj.focus();
    form.submit.disabled=false;
    return false;
   }
 return true;
}

function trim(str)
{var first,last;
 for (first=0; first<str.length&&str.charCodeAt(first)==32; first++);
 for (last=str.length; last>first&&str.charCodeAt(last-1)==32; last--);
 return (last>first?str.substr(first,last-first):'');
}

function emailCheck(emailStr)
{emailStr=trim(emailStr);
 if(emailStr=='')return false;
 var emailPat=/^(.+)@(.+)\.(.{2,})$/;
 var matchArray=emailStr.match(emailPat);
 if (matchArray==null) return false;
 return true;
}


function getObj(id,d)
{var i,o,d; if(!d) d=document;
 if(!(o=d[id])&&d.all) o=d.all[id];
 if(!o&&d.getElementById) o=d.getElementById(id);
 for(i=0;!o&&i<d.forms.length;i++) o=d.forms[i][id];
 for(i=0;!o&&d.layers&&i<d.layers.length;i++) o=getObj(id,d.layers[i].document);
 return o;
}

function preloadImages()
{var d=document;
 if(d.images)
   {if(!d._pi) d._pi=new Array();
    var i,j=d._pi.length,a=preloadImages.arguments;
    for(i=0;i<a.length;i++)
      {d._pi[j]=new Image; d._pi[j++].src=a[i];
      }
   }
}

function swapImages()
{var i,j=0,io,a=swapImages.arguments; document._soi=new Array;
 for(i=0;i<(a.length-1);i+=2)
   if((io=getObj(a[i]))!=null)
     {document._soi[j++]=io; if(!io.oSrc) io.oSrc=io.src; io.src=a[i+1];}
}

function restoreSwapImages()
{var i,io,a=document._soi;
 for(i=0;a&&i<a.length&&(io=a[i])&&io.oSrc;i++) io.src=io.oSrc;
}


