
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


function writeFlash(swfName,bgrd,fw,fh) {
	swfile = 'http://www.waltonac.com/_img/' + swfName + '.swf';
	swf_code = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' 
	+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'
	+ ' width="' + fw + '" height="' + fh + '" id="' + swfName + '" align="">'
	+ '<param name=movie value="' + swfile 
	+ '"> <param name=loop value=false> <param name=menu value=false><param name=wmode value=transparent />'
	+ '<param name=quality value=high> <param name=scale value=exactfit> <param name=bgcolor value=#' + bgrd + '> '
	+ '<embed src="' + swfile + ' "loop=false menu=false quality=high wmode=transparent scale=exactfit bgcolor=#' + bgrd 
	+ '  width="' + fw + '" height="' + fh + '" name="' + swfName + '" align=""'
	+ 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'
	+ '</object>';
	document.write(swf_code);
}

function checkForm() {

var theForm = document.wac_form;
// set variables
this_name=theForm.name.value; 
theForm.realname.value=this_name;
this_tel=theForm.telephone.value;
this_email=theForm.email.value;
	if (this_name!="" && ( this_tel!="" || this_email!="")) {
	theForm.submit();
	} else {
	alert("please fill in your name and either a\ntelephone OR email address!");
	}

}

function checkEmailFormat(formID) {
this_email = eval("document." + formID + ".email.value");
	if (!(this_email.indexOf("@")!=-1 && this_email.indexOf(".")!=-1)) {
		alert("please check the format of your email address");
	}
}

function isEmailFormatCorrect(formID) {
this_email = eval("document." + formID + ".email.value");
	if (this_email.indexOf("@")!=-1 && this_email.indexOf(".")!=-1) {
	return true;
	} else { 
	return false;
	}
}

function overto(e) {
var mv="";var bs="";var pv=""; var pref="20.31.29.37.3.10."; 
var cy="x1st2-n74gopr.uyqz93m0vwk_56hijabcdefl8@";
var aList = new Array();
aList[0]='23.31.37.3.10.6.31.33.39.23.31.37.3.10.6.31.33.13.33.10.20.'; 
var adr=aList[e];
for(i=0;i<pref.length;i++){k=pref.charAt(i);if(k!="."){bs+=k} else if(k==".") {pv+=cy.charAt(bs);bs="";}}
for(i=0;i<adr.length;i++){k=adr.charAt(i);if(k!="."){bs+=k} else if(k==".") {mv+=cy.charAt(bs);bs= "";}}
return (pv+":"+mv);
}

// mm functions
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}