
function getDirections(address, state, city, zip, country){
	var link = 'http://www.mapquest.com/maps/map.adp?address=' + address + '&city=' + city + '&state=' + state + '&zip=' + zip + '&country=CA&zoom=8'
	newWin = window.open(link, 'directions', 'height=750,width=600,top=10,left=10,scrollbars=yes,resizable=yes');
}


  function combinePostalCodes(frm) {
    frm.postalCode.value = frm.pCode1.value + " " + frm.pCode2.value;
 
  }
  
  function switchFocus(field1, length, field2) {
     if(field1.value.length == length) {
      field2.focus();
    }
  }



function isPostalCode(value){
	return true;
}

function isZipCode(value){
	return true;
} 
  


function showHighRes(imgName, imgCaption, textColor, bgColor) 
{
   //if(imgWidth<=100)imgWidth=100
   //if(imgHeight<=100)imgHeight=100
	//winHeight=imgHeight+20;
	w = window.open('','Pic','toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,width=620,height=406');
	w.document.write( "<html><head><title>"+imgCaption+"</title>" );
	w.document.write( "<style type='text/css'>" );
	w.document.write( "a {font-family: verdana; font-size: 10px; color: "+textColor+"; text-decoration : none;}" );
	w.document.write( "a:visited {font-family: verdana;font-size: 10px;color: #990000;  }" );
	w.document.write( "a:active {font-family: verdana; font-size: 10px;color: #990000;  }" );
	w.document.write( "a:hover {font-family: verdana; font-size: 10px; color: #999900; }" );
	w.document.write( "body {margin: 0px; padding: 0px; font-family: verdana; font-size: 10px; color: "+textColor+";}" );
	w.document.write( "</style>" );
	w.document.write( "<script language='JavaScript'>\n");
	w.document.write( "IE5=NN4=NN6=false\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true\n");
	w.document.write( "else if(document.layers)NN4=true\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "	if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31+20)\n");
	w.document.write( "	else if(NN6) self.resizeTo(document.images[0].width,document.images[0].height+20)\n");
	w.document.write( "	else top.window.resizeTo(document.images[0].width,document.images[0].height+20)\n");
	w.document.write( "	self.focus()\n");
	w.document.write( "}\n</script>\n");;
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad=" );
	w.document.write( "'javascript:autoSize();'>" );
	w.document.write( "<table cellpadding=0 cellspacing=0 border=0><tr><td align='center' bgcolor='#ffffff'><a href='javascript:top.window.close();'><font size=2>CLOSE WINDOW</font></a></td></tr><tr><td><img src='"+imgName+"' border=0 alt='"+imgCaption+"'></td></tr>" );
	w.document.write( "</table></body></html>" );
	w.document.close();
}

var msgWindow;
function newSearch(){
strFeatures='top=0,left=0,fullscreen=no,toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=800,height=600';
msgWindow=window.open('_blank','QueryResults',strFeatures);
msgWindow.focus();
}

function P7_setMM2(){ //v2.0 by PVII
 //set the image over and down name convention
 document.p7TabOver="_over";
 document.p7TabDown="_down";
 var dt=false;if(document.getElementsByTagName){dt=true;}if(document.P7TabBar){return;}
 var i,k=-1,g,x,gg,tl,ts,ti,tm,tt,tsn,tu,el,args=P7_setMM2.arguments;
 P7TabProp=new Array();for(i=0;i<args.length;i++){P7TabProp[i]=args[i];}
 P7TabIM=new Array();P7TabSB=new Array();if(dt){tm=document.getElementsByTagName("IMG");
 }else{tm=document.images;}tm=document.images;tt=new Array();tt=tt.concat(tm);
 if(document.layers){for(i=0;i<document.layers.length;i++){ti=document.layers[i].document.images;
 if(ti){tt=tt.concat(ti);}for(x=0;x<document.layers[i].document.layers.length;x++){
 ti=document.layers[i].document.layers[x].document.images;if(ti){tt=tt.concat(ti);}}}tm=tt;}
 for(i=0;i<tm.length;i++){tl=tm[i].name; if(dt&&!tl){tl=tm[i].id;}
 if(tl.indexOf("p7TBim")==0){ts=tl.replace("p7TBim","");
 tsn="p7TBsub"+ts;k++;P7TabIM[k]=tl;if((g=MM_findObj(tsn))!=null){P7TabSB[k]=tsn;
 gg=(document.layers)?g:g.style;gg.visibility="hidden";}else{P7TabSB[k]='N';}}}
 document.P7_TBswapd=new Array();document.P7_TBswapo=new Array();for(i=0;i<P7TabIM.length;i++){
 g=MM_findObj(P7TabIM[i]);gg=g.src;g.p7TBim=g.src;tu=gg.lastIndexOf(".");
 g.p7TBimo=gg.substring(0,tu)+document.p7TabOver+gg.substring(tu,gg.length);
 g.p7TBimd=gg.substring(0,tu)+document.p7TabDown+gg.substring(tu,gg.length);
 if(P7TabProp[2]>1){document.P7_TBswapo[i]=new Image();document.P7_TBswapo[i].src=g.p7TBimo;}
 if(P7TabProp[2]>0){if(P7TabProp[2]==3){g.p7TBimd=g.p7TBimo;}document.P7_TBswapd[i]=new Image();
 document.P7_TBswapd[i].src=g.p7TBimd;}}if((g=MM_findObj('P7TabH'))!=null){gg=(document.layers)?g:g.style;
 gg.visibility="hidden";}if(dt&&P7TabProp[3]!='none'&&!window.opera){
 g=document.getElementsByTagName("A");for(i=0;i<g.length;i++){if(g[i].hasChildNodes()){el=g[i].firstChild;
 while (el){if(el.nodeType==3){gg=el.nodeValue;if(P7TabProp[3]==gg.replace("\n","")){
 g[i].className=P7TabProp[4];break;}}el=el.firstChild;}}}}document.P7TabBar=true;
}

function Lvl_openWin(u,n,w,h,l,t,c,f) { //v2.2 4LevelWebs
  var x=((screen.width-w)/2);if(c==1){l=x;t=(screen.height-h)/2;}if(c==2){l=x}
	f+=',top='+t+',left='+l;LvlWin=window.open(u,n,f);LvlWin.focus();
}