var pers=null;var tf=null;var mi=null;var vp=null;var EventCache=function(){var listEvents=[];return{listEvents:listEvents,add:function(node,sEventName,fHandler){listEvents.push(arguments);},flush:function(){var i,item;for(i=listEvents.length-1;i>=0;i--){item=listEvents[i];if(item[0].removeEventListener){item[0].removeEventListener(item[1],item[2],false);};if(item[1].substring(0,2)!='on'){item[1]='on'+item[1];};if(item[0].detachEvent){item[0].detachEvent(item[1],item[2]);};item[0][item[1]]=null;};}};}();function addEvent(obj,evType,fn){if(typeof fn!='function')return false;var result;if(obj.addEventListener){obj.addEventListener(evType,fn,false);result=true;}else if(obj.attachEvent){result=obj.attachEvent('on'+evType,fn);}else{return false;}EventCache.add(obj,evType,fn,false);return result;}function toggleField(field,showField,reset){var title=document.getElementById(field);if(title){title.style.display=showField?'block':'none';if(reset&&reset==true)title.value='';}}function bAction(field,page,qst,dval,cid){var tField=document.getElementById(field);var sQS='';if(tField&&tField.value!=''&&(dval&&tField.value!=dval)){sQS=escape(tField.value).replace(/\+/g,'%2B').replace(/\"/g,'%22').replace(/\'/g,'%27');if(sQS)document.location.href=page+'?'+qst+'='+sQS+(cid?'&cid='+cid:'');}}function kEnter(e){var keyNum;if(window.event)keyNum=e.keyCode;else if(e.which)keyNum=e.which;if(keyNum==13)return true;return false;}function bClick(e,buttonid){if(kEnter(e)){var bt=document.getElementById(buttonid);if(bt&&typeof bt=='object'){bt.click();return false;}}return true;}function externalLinks(){if(!document.getElementsByTagName)return;var anchors=document.getElementsByTagName('a');for(var i=0;i<anchors.length;i++){var anchor=anchors[i];if(anchor.getAttribute('href')&&anchor.getAttribute('rel')=='external')anchor.target='_blank';}}function checkQuantities(fName){var rc=false;if(document.getElementById){var frm=document.getElementById(fName);for(i=0;i<frm.elements.length;i++){var em=frm.elements[i];if(em.type=='text'&&em.id.indexOf('qty_')==0){if(em.value.length>0){var va=parseInt(em.value);if(!isNaN(va)&&va>0){rc=true;break;}}}}}if(!rc)alert('Please enter a valid quantity for one or more products.');return rc;}function tellFriend(pcat,cat,id){var url='TellAFriend.aspx?ParentCategoryID='+pcat+'&CategoryID='+cat+'&ProductID='+id;var width=600;var height=450;var left=((screen.width-width)/2);var top=((screen.height-height)/2);var options='status=no,scrollbars=yes,resizable=no,menubar=no,left='+left+',top='+top+',width='+width+',height='+height;if(tf==null||tf.closed)tf=window.open(url,'TellAFriend',options);tf.focus();}function catTellFriend(cat,pg){var url='TellAFriend.aspx?Catalogue='+cat;if(pg)url+='&page='+pg;var width=600;var height=450;var left=((screen.width-width)/2);var top=((screen.height-height)/2);var options='status=no,scrollbars=yes,resizable=no,menubar=no,left='+left+',top='+top+',width='+width+',height='+height;if(tf==null||tf.closed)tf=window.open(url,'TellAFriend',options);tf.focus();return false;}function moreInfo(id){var url='PopupMoreInformation.aspx?ProductID='+id;var width=350;var height=350;var left=((screen.width-width)/2);var top=((screen.height-height)/2);var options='status=no,scrollbars=yes,resizable=no,menubar=no,left='+left+',top='+top+',width='+width+',height='+height;if(mi==null||mi.closed)mi=window.open(url,'MoreInfoPopup',options);mi.focus();}function helpInfo(id){var url='PopupMoreInformation.aspx?helpid='+id;var width=350;var height=350;var left=((screen.width-width)/2);var top=((screen.height-height)/2);var options='status=no,scrollbars=yes,resizable=no,menubar=no,left='+left+',top='+top+',width='+width+',height='+height;if(mi==null||mi.closed)mi=window.open(url,'MoreInfoPopup',options);mi.focus();}function personalise(id){var url='PopupPersonaliseProd.aspx'+(id?'?ProductID='+id:'');var width=600;var height=400;var left=((screen.width-width)/2);var top=((screen.height-height)/2);var options='status=no,scrollbars=yes,resizable=no,menubar=no,left='+left+',top='+top+',width='+width+',height='+height;if(pers==null||pers.closed)pers=window.open(url,'PersonalisePopup',options);pers.focus();}function vsPopup(){var url='https://seal.verisign.com/splash?form_file=fdf/splash.fdf&dn=WWW.INNOVATIONS.COM.AU&lang=en';var width=520;var height=450;var left=((screen.width-width)/2);var top=((screen.height-height)/2);var options='status=no,scrollbars=no,resizable=no,menubar=no,left='+left+',top='+top+',width='+width+',height='+height;if(vp==null||vp.closed)vp=window.open(url,'vsign',options);vp.focus();}function closePopups(){if(pers!=null)pers.close();if(tf!=null)tf.close();if(mi!=null)mi.close();if(vp!=null)vp.close();}addEvent(window,'unload',closePopups);addEvent(window,'load',externalLinks);
