function newsLetterPopup(a){if(a.newsletter_email.value){if(validEmail(a.newsletter_email.value)){emailURL="http://lists.ipcmedia.com/cgi-bin/subscribe.cgi/1?email_addr="+a.newsletter_email.value;window.open(emailURL,"emailPopup","height=300,width=550,top=100,left=100,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no");return true}}alert("Please enter a valid email address.");a.newsletter_email.focus();a.newsletter_email.select();return false}function nmeExtraPopup(a){if(a.newsletter_email_extra.value){if(validEmail(a.newsletter_email_extra.value)){emailURL="http://lists.ipcmedia.com/cgi-bin/subscribe.cgi/1?email_addr="+a.newsletter_email_extra.value;window.open(emailURL,"emailPopup","height=300,width=550,top=100,left=100,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no");return true}}alert("Please enter a valid email address.");a.newsletter_email_extra.focus();a.newsletter_email_extra.select();return false}function popupform(c,b){var a=document.getElementById("emailaddress");if(a){if(validate_email(a.value||"")){window.open("",b,"");c.target=b;return true}else{alert("Please enter a valid email address.")}}return false}function validate_email(d){var b=/^[A-Za-z0-9_\-\.]+\@[A-Za-z0-9_\-\.]+\.([A-Za-z]{2,4})$/;var c=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/i;b.lastIndex=0;c.lastIndex=0;var a=b.exec(d);if(a){a=a[1];if(a.length==2||(a.length>2&&a.match(c))){return true}}return false}function enableField(){document.form2.submit.disabled=false}function validEmail(a){invalidChars=" /:,;";if(a==""){return false}for(i=0;i<invalidChars.length;i++){badChar=invalidChars.charAt(i);if(a.indexOf(badChar,0)>-1){return false}}atPos=a.indexOf("@",1);if(atPos==-1){return false}if(a.indexOf("@",atPos+1)!=-1){return false}periodPos=a.indexOf(".",atPos);if(periodPos==-1){return false}if(periodPos+3>a.length){return false}domainName=a.substring(atPos+1,periodPos);if(domainName.length<2){return false}return true}function getCookie(c){var d=document.cookie.indexOf(c+"=");var a=d+c.length+1;if((!d)&&(c!=document.cookie.substring(0,c.length))){return null}if(d==-1){return null}var b=document.cookie.indexOf(";",a);if(b==-1){b=document.cookie.length}return unescape(document.cookie.substring(a,b))}function setCookie(c,e,a,h,d,g){var b=new Date();b.setTime(b.getTime());if(a){a=a*1000*60*60*24}var f=new Date(b.getTime()+(a));document.cookie=c+"="+escape(e)+((a)?";expires="+f.toGMTString():"")+((h)?";path="+h:"")+((d)?";domain="+d:"")+((g)?";secure":"")}function deleteCookie(a,c,b){if(getCookie(a)){document.cookie=a+"="+((c)?";path="+c:"")+((b)?";domain="+b:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}function validEmail(a){invalidChars=" /:,;";if(a==""){return false}for(i=0;i<invalidChars.length;i++){badChar=invalidChars.charAt(i);if(a.indexOf(badChar,0)>-1){return false}}atPos=a.indexOf("@",1);if(atPos==-1){return false}if(a.indexOf("@",atPos+1)!=-1){return false}periodPos=a.indexOf(".",atPos);if(periodPos==-1){return false}if(periodPos+3>a.length){return false}domainName=a.substring(atPos+1,periodPos);if(domainName.length<2){return false}return true}function checkLoginForm(a){if(a.username.value==""||a.username.value==null){alert("Please enter your username");a.username.focus();a.username.select();a.username.style.border="1px solid #cc0000";return false}else{a.username.style.border="1px solid #000000"}if(a.password.value==""||a.password.value==null){alert("Please enter your password");a.password.focus();a.password.select();a.password.style.border="1px solid #cc0000";return false}else{a.password.style.border="1px solid #000000"}}function checkForgotPasswordForm(a){if(a.username.value==""&&a.email.value==""){alert("Please enter either your username or email");a.username.focus();return false}return true}function checkForgotResetPasswordForm(a){if(a.password.value==""){alert("Please enter your new password");a.password.focus();return false}if(a.confirmpassword.value==""){alert("Please enter your new password confirmation");a.confirmpassword.focus();return false}if(a.password.value!=a.confirmpassword.value){alert("Sorry, your passwords are not identical.");a.password.focus();return false}return true}jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};$(document).ready(function(){var h="nme",f=new Date(),a=$.cookie("ipc_"+h+"_last_visit"),c=document.referrer.toLowerCase(),b=false,g=false,e=false,d=false;if(c.length===0){g=true}else{queryStart=c.lastIndexOf("?");if(queryStart!=-1){queryString=c.substring(queryStart);if(queryString.lastIndexOf("="+h)!=-1||queryString.lastIndexOf("+"+h)!=-1){e=true}}}if(a!==null&&a!=f.getDate()){d=true}if($.cookie("ipc_"+h+"_core")!==null){b=true}if(g===true||e===true||d===true||b===true){$.cookie("ipc_"+h+"_core",Math.round(f.getTime()/1000),{expires:365,path:"/"});_gaq.push(["_setCustomVar",1,"Core","Y",1]);$.getScript("http://adserver.adtech.de/bind?ckey1=cookiename1;cvalue1=cookievalue1;expiresDays=90;adct=text/html;misc=123")}if(a===null||a!=f.getDate()){$.cookie("ipc_"+h+"_last_visit",f.getDate(),{expires:30,path:"/"})}});var ipc=ipc||{};ipc.adtech=function(){var b={},a=-1,j=[],d=[],f=[],p="",o=function(){b={};a=-1;j=[];d=[]},c=function(){var s="";h();m();q();s=d.concat(b.key_params).concat(j).join("+");b.params[a]="key="+s.replace(/^\+*/,"").replace(/\+*$/,"");if(!window.adgroupid){window.adgroupid=Math.round(Math.random()*1000)}var t="misc="+new Date().getTime(),r="grp="+window.adgroupid;return[b.base_url,b.params.join(";"),"grp="+window.adgroupid,t].join(";")+";"+p},e=function(r){var s=[];r=r.replace(/;$/,"");s=r.split(";");if(0!==s.length){b.base_url=s[0];b.params=s.splice(1,s.length-1)}},g=function(){var t,r;t=b.params[a];if(t){r=t.indexOf("=",0);if(-1!=r){r+=1;var s=t.substring(r,t.length);b.key_params=s.split("+")}}else{b.key_params=[];a=b.params.length}},l=function(){if(b&&b.params&&(b.params.length>0)){for(var r=0;r<b.params.length;r+=1){if("key="==b.params[r].substring(0,4)){a=r;break}}}},n=function(r){if(r.order){if(r.name&&window[r.name]){f.push(r)}}else{k('undefined propery "order" for one of your objects')}},m=function(){var s;for(var r=0;r<f.length;r+=1){s=j;if(f[r].placement=="before"){s=d}if(f[r].fn&&(typeof f[r].fn=="function")){s.push(f[r].fn.call(f[r].fn,window[f[r].name]))}else{s.push(f[r].name+"="+window[f[r].name])}}},h=function(){f.sort(function(s,r){return s.order-r.order})},q=function(r){for(var s in r){if(r.hasOwnProperty&&r.hasOwnProperty(s)){if(typeof r[s]=="number"||typeof r[s]=="string"){p+="kv"+s+"="+r[s]+";"}}}},k=function(r){r="Error: "+r;if(console&&console.log){console.log(r)}else{alert(r)}};return{getAugmentedUrl:function(s){e(s);l();g();var r=c();o();return r},pushParams:function(r){n(r)},pushNvp:function(r){q(r)},displayParamsToAdd:function(){return j}}}();
