url=window.document.URL.toLowerCase();url=url.substring(0,url.indexOf('.nsf')+4);// Browser DetectionisMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;NS4 = (document.layers) ? true : false;IEmac = ((document.all)&&(isMac)) ? true : false;IE4plus = (document.all) ? true : false;IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;ver4 = (NS4 || IE4plus) ? true : false;NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;IE5plus = IE5 || IE6;IEMajor = 0;if (IE4plus){start = navigator.appVersion.indexOf("MSIE");end = navigator.appVersion.indexOf(".",start);IEMajor = parseInt(navigator.appVersion.substring(start+5,end));IE5plus = (IEMajor>=5) ? true : false;}ie=(document.all && document.getElementById);ns=(!document.all && document.getElementById);function updateCity(response){var el=document.getElementById("city");el.options.length=0;//add options to DOMfor(x in response.text){var opt = new Option(response.text[x],response.value[x],null,null);if (ie) el.add(opt); else el.add(opt,el.options[el.options.length]);}}function getCity(param){param = 'cmd=getcity&state='+param;http( 'GET' , '/dj-photo-video.nsf/ajax?openagent&'+param , updateCity , null ); }function usaHandler(f){var vx=document.getElementById('vendor');var vs=vx.options[vx.selectedIndex].value;if(vs=="NONE"){alert('Please select a Vendor');return false;}var vx=document.getElementById('state');var vp=vx.options[vx.selectedIndex].value;if(vp=="NONE"){alert('Please select a State/Province');return false;}var vx=document.getElementById('city');var vc=vx.options[vx.selectedIndex].value;if (vc=='NONE') return false;window.location.href="/dj-photo-video.nsf/usalinks!open&V="+vs+"&X="+vc;}function localHandler(f){var vx=document.getElementById('vendor');var vs=vx.options[vx.selectedIndex].value;if(vs=="NONE"){alert('Please select a Vendor');return false;}var vx=document.getElementById('zstate');var vp=vx.options[vx.selectedIndex].value;if(vp=="NONE"){alert('Please select a State/Province');return false;}var vx=document.getElementById('zcity');var vc=vx.options[vx.selectedIndex].value;if (vc=='NONE') return false;window.location.href="/dj-photo-video.nsf/usalinks!open&V="+vs+"&X="+vc;}function caHandler(f){var URL = f.options[f.selectedIndex].value;if (URL=='NONE') return false;url="/wedjca.nsf";window.location.href = url+"/province/"+URL;}function getCookie(NameOfCookie){// getCookie("mycookie")if (document.cookie.length > 0) { begin = document.cookie.indexOf(NameOfCookie+"="); if (begin != -1) { begin += NameOfCookie.length+1; end = document.cookie.indexOf(";", begin);if (end == -1) end = document.cookie.length;k=unescape(document.cookie.substring(begin, end));return k} }return '';}function setCookie(NameOfCookie, value, expiredays) {//setCookie("mycookie","123",30)var ExpireDate = new Date ();ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());}function delCookie (NameOfCookie) {//this function removes a cookie i.e. delCookie("name")if (getCookie(NameOfCookie)) {document.cookie = NameOfCookie + "=" +"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}function validate(object){ //validate fields here doc=window.document; var id=doc.getElementById('start_month'); var start_month=id.options[id.selectedIndex].value; var id=doc.getElementById('start_day'); var start_day=id.options[id.selectedIndex].value; var id=doc.getElementById('start_year'); var start_year=id.options[id.selectedIndex].value;  //byebye if zeros if ((start_day==0) | (start_month==0) | (start_year==0)) {     alert('Please select a valid date');     return false;     }//success - set cookies and save setCookie("Month",start_month,30) setCookie("Day",start_day,30) setCookie("Year",start_year,30) object.value='Wait..'; window.location='http://www.checkmyweddingdate.com/cmd.nsf/index.html?open&M='+start_month+'&D='+start_day+'&Y='+start_year; }function bookmarksite(title,url){if (window.sidebar) // firefox	window.sidebar.addPanel(title, url, "");else if(window.opera && window.print){ // opera	var elem = document.createElement('a');	elem.setAttribute('href',url);	elem.setAttribute('title',title);	elem.setAttribute('rel','sidebar');	elem.click();} else if(document.all)// ie	window.external.AddFavorite(url, title);}