function bookmarksite(title, url){ if (document.all) { window.external.AddFavorite(url, title); } else if (window.sidebar) { window.sidebar.addPanel(title, url, ""); } } function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } var win = null; function NewWindow(mypage,myname,w,h,scroll,r) { LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+r+'status=yes' win = window.open(mypage,myname,settings) } function windowLinks() { if(!document.getElementsByTagName) { return; } var anchors = document.getElementsByTagName("a"); for (var i = 0; i < anchors.length; i++) { var anchor = anchors[i]; var relIndex = anchor.rel; if (relIndex){ var relSplit = relIndex.split("|"); /* XHTML compliant target attribute */ if (relSplit[0] == "external") { anchor.target = "_blank"; anchor.className = "external"; anchor.title = "Load in new window: "+ anchor.href; /* XHTML compliant popup attribute */ } else if (relSplit[0] == "popup") { anchor.className = "popup"; anchor.title = "Link loads in Popup Window"; anchor.popupWidth = relSplit[1]; anchor.popupHeight = relSplit[2]; /* added the ablitity to have resize or scroll */ anchor.popupScroll = relSplit[3]; anchor.popupResize = relSplit[4]; anchor.onclick = function() { NewWindow(this.href,'',this.popupWidth,this.popupHeight,this.popupScroll,this.popupResize);return false; }; } } } } var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/ function isValidEmail(str) { return emailfilter.test(str); } function checkForm(frm){ var error=false; var message; message = "Please enter the following information:\n"; if(frm.elements['Name'].value == "") { message += "- Your Name\n"; error = true; } if(frm.elements['Phone'].value == "") { message += "- Your Phone Number\n"; error = true; } if(isValidEmail(frm.elements['Email'].value)==false) { message += "- A Valid Email Address\n"; error = true; } if (error!=false) { alert(message); return false; } else { return true; } } addLoadEvent( function() { windowLinks(); } );