function Storm(){}Storm.prototype.prefix=(function(){var c=/localhost/i,b=c.test(document.location),a;a=(b)?"/xampp/_sites/Primo/":"/";return a})();Storm.prototype.loaded=(function(){var load_events=[],load_timer,done,exec,old_onload;var init=function(){done=true;window.clearInterval(load_timer);while((exec=load_events.shift())){exec()}};return function(func){if(done){return func()}if(!load_events[0]){if(document.addEventListener){document.addEventListener("DOMContentLoaded",init,false);
/*@cc_on @*/
/*@if (@_win32)
				load_timer = setInterval(function() {
					if (document.body) {
						try {
							document.createElement('div').doScroll('left');
							clearInterval(load_timer);
							return init();
						} catch(e) {}
					}
				}, 10);
			@*/
/*@end @*/
}try{if(window.navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1]<525){load_timer=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){init()}},10)}}catch(e){}old_onload=window.onload;window.onload=function(){init();if(old_onload){old_onload()}window.alert("window.onload is complete")}}load_events.push(func)}})();Storm.prototype.external=function(){var e=this;this.settings="location=yes,resizable=yes,width="+screen.availWidth+",height="+screen.availHeight+",scrollbars=1,left=0,top=0";this.popup=function(g){var a=g.href;return function(){window.open(a,"external",e.settings);return false}};var c=document.getElementsByTagName("a"),b=c.length,f=/^http(s)?:\/\/(?!(www.)?primoplc)/;while(b--){var d=c[b].getAttribute("href");if(f.test(d)){c[b].onclick=this.popup(c[b])}}};Storm.prototype.init=function(){var b=this;var a=document.getElementById("insuranceform");if(a){a.onsubmit=function(){return b.validate(document)}}if(document.getElementById("home")){loadScript(Storm.prefix+"Assets/Scripts/SWFObject.php",function(){var c={},d={wmode:"transparent"};swfobject.embedSWF(Storm.prefix+"Assets/Flash/Banner.swf","promotion","300","250","9.0.0",null,c,d)})}};Storm.prototype.validate=function(e){var b=e.getElementById("fullname"),c=e.getElementById("email"),a=e.getElementById("discover");if(!/^[a-zA-Z.-]{2,}\s[a-zA-Z-]+\s?[a-zA-Z-]*\s?[a-zA-Z-]*$/i.test(b.value)){alert("Please ensure you enter your full name");b.focus();return false}else{if(!/^[a-zA-Z0-9!#\$%&'\*=\?\^_`{\|}\+~\/-]+(?!\.@)(\.{1})?[a-zA-Z0-9!#\$%&'\*=\?\^_`{\|}\+~\/-]+@{1}[a-zA-Z-\.]+/i.test(c.value)){alert("Please ensure you enter a valid email address");c.focus();return false}else{if(a.value==="nooption"){alert("Please ensure you choose an option from the 'How did you discover us?' drop down menu");a.focus();return false}else{return true}}}};var Storm=new Storm();window.onload=Storm.external;
