//------------------- OPEN NEW WINDOW -------------------// // generic window // function EZowin(url) { //1.0 window.open(url,'ezPopUp','width=400, height=325, resizable=0,scrollbars=yes,menubar=no,directories=0,status=0,copyhistory=0,minimise=no,maximise=no,left=0,top=0'); } // php window (bna & virtual tours) // function owin(url) { //iView v1.0 window.open(('../bna/bna.php?var=' + url),'UPpopup','width=520, height=390, resizable=0,scrollbars=0,menubar=no,directories=0,status=0,copyhistory=0,minimise=no,maximise=no,left=0,top=0'); } //------------------- for clearing and replacing text in form input fields and textareas -------------------// function clearText(thefield) { if (thefield.defaultValue==thefield.value) { thefield.value = "" } } function replaceText(thefield) { if (thefield.value=="") { thefield.value = thefield.defaultValue } } // Son-Of-Sucker-Fish IE Hack (Updated for IE7) // ----------------------------------------------------------------- sfHover = function() { var sfEls = document.getElementById("nav").getElementsByTagName("LI"); // for each list item in the menu... for (var i=0; i < sfEls.length; i++) { // Is this IE7? If so, use onmouseleave to fix the fact that onmouseout won't fire is_IE7 = navigator.appVersion.indexOf("MSIE 7.0") != -1; sfEls[i].onmouseover = function() { this.className+=" sfHover"; // is this a top-level menu item? var child_ul = this.getElementsByTagName('ul')[0]; if (child_ul && is_IE7){ // fix for IE7 child_ul.style.position = 'static'; } } sfEls[i].onmouseleave = function() { // is this a top-level menu item? var child_ul = this.getElementsByTagName('ul')[0]; if (child_ul && is_IE7){ // fix for IE7 child_ul.style.position = 'absolute'; child_ul.style.left = '-9000px'; } } sfEls[i].onmouseout = function() { this.className=this.className.replace(new RegExp(" sfHover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover); //---------------------FLASH--EMBED-------------------// function printFlash(source, width, height, id, bg_color, flashVars) { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } //------------------- Form Validation -------------------// 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&&i0) if (t==1){ //fromto ma=a[i+1].split('_');if(isNaN(v)||v ma[1]/1){err=true} } else if (t==2){ rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true; } else if (t==3){ // date ma=a[i+1].split("#");at=v.match(ma[0]); if(at){ cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]]; dte=new Date(cy,cm,cd); if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true}; }else{err=true} } else if (t==4){ // time ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true} } else if (t==5){ // check this 2 if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")]; if(!o1.checked){err=true} } else if (t==6){ // the same if(v!=MM_findObj(a[i+1]).value){err=true} } } else if (!o.type&&o.length>0&&o[0].type=='radio'){ at = a[i].match(/(.*)\[(\d+)\].*/i); o2=(o.length>1)?o[at[2]]:o; if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true} if (t==2){ oo=false; for(j=0;j"+dayarray[day]+" "+montharray[month]+" "+daym+", "+year+"

") } function checkValidation() { //alert( document.getElementById('Customer_Phone').value ); || phone != parseInt(phone) phone = document.getElementById('Customer_Phone').value.split(' ').join(''); //test = (parseInt(phone) == phone); //alert("." + IsNumeric ( "123 321".split(' ').join('') ) + "."); /*if (parseInt(phone) != phone) { alert("GOOD"); } else { alert("BAD"); }*/ if ( phone == "" || phone == "phone") { alert("Please fill in the telephone box."); //} else if ( parseInt(phone) != phone ) { } else if ( IsNumeric ( phone ) == false ) { alert("You must provide only numeric characters."); } else { document.calform.submit(); } } function IsNumeric(sText) { var ValidChars = "0123456789."; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; //return sText; }