var allowpop=1;var referList=["http://www.geovisioncard.com/"];clearRefersFlyIn();function clearRefersFlyIn(){var A=document.referrer;for(var B=0;B<referList.length;B++){if(referList[B]==A){createCookie("ApexCCTV_pmgShown","1",1800000)}}}function showOptInFlyIn(){showFlyIn("optInFlyIn","CENTER","TOP-160","CENTER","MIDDLE-120",500,90,"ApexCCTV_optInShown",28800000)}function showPriceMatchFlyIn(){showFlyIn("pmgFlyIn","CENTER","TOP-160","CENTER","MIDDLE-120",500,90,"ApexCCTV_pmgShown",1800000)}function showPriceMatchFlyIn2(){showFlyIn("pmgFlyIn","CENTER","TOP-160","CENTER","MIDDLE-120",500,90,"ApexCCTV_pmgShown",1800000)}function getXresult(B,E){var C="(LEFT|CENTER|RIGHT)?([\\+\\-]?[\\d]+)?(?!.)";var A=E.toString().match(C);var D=0;if(A[1]=="LEFT"){D=0}if(A[1]=="CENTER"){D=(GetWindowWidth()-parseInt(B.style.width))/2}if(A[1]=="RIGHT"){D=GetWindowWidth()}if(A[2]){D=D+parseInt(A[2])}return D}function getYresult(B,D){var E="(TOP|MIDDLE|BOTTOM)?([\\+\\-]?[\\d]+)?(?!.)";var A=D.toString().match(E);var C=0;if(A[1]=="TOP"){C=0}if(A[1]=="MIDDLE"){C=(GetWindowHeight()-parseInt(B.style.height))/2}if(A[1]=="BOTTOM"){C=GetWindowHeight()}if(A[2]){C=C+parseInt(A[2])}return C}function showFlyIn(H,E,D,L,J,F,C,I,G){var A;if(I&&G){A=readCookie(I)}if(!A||A<1){var K=findObj(H);E=getXresult(K,E);D=getYresult(K,D);L=getXresult(K,L);J=getYresult(K,J);K.style.left=E+"px";K.style.top=D+"px";var B="flyIn('"+H+"',"+L+","+J+","+C+")";setTimeout(B,F);createCookie(I,"1",G)}}function showPopUnder(){var A="ApexCCTV2";var B=readCookie(A);if(!B||B<1){popunder=window.open("joinmailinglist.aspx","","width=300, height=260, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, titlebar=no, toolbar=no, directories=no");popunder.blur();window.focus()}createCookie(A,"1",8)}function showThankYou(){var B="ApexCCTV";var C=readCookie(B);var A=findObj("thankYou");if(A){A.style.left=(GetWindowWidth()/2-100)+"px";A.style.top=(GetWindowHeight()/2-150)+"px";A.style.visibility="visible"}createCookie(B,"2",8)}function flyIn(){var ppl=arguments[0].toString();var objppl=findObj(ppl);if(objppl==null){return }var args=arguments,movetoX=parseInt(arguments[1]),movetoY=parseInt(arguments[2]),movespeed=parseInt(arguments[3]);var cycle=10,pxl="";if(!document.layers){objppl=objppl.style}if(objppl.tmofn!=null){clearTimeout(objppl.tmofn)}var pplcoordX=parseInt(objppl.left),pplcoordY=parseInt(objppl.top);var xX=movetoX,yY=movetoY;if((pplcoordX!=movetoX)||(pplcoordY!=movetoY)){var moveX=((movetoX-pplcoordX)/movespeed),moveY=((movetoY-pplcoordY)/movespeed);moveX=(moveX>0)?Math.ceil(moveX):Math.floor(moveX);movetoX=pplcoordX+moveX;moveY=(moveY>0)?Math.ceil(moveY):Math.floor(moveY);movetoY=pplcoordY+moveY;if((parseInt(navigator.appVersion)>4||navigator.userAgent.indexOf("MSIE")>-1)&&(!window.opera)){pxl="px"}if(moveX!=0){eval("objppl.left='"+movetoX+pxl+"'")}if(moveY!=0){eval("objppl.top = '"+movetoY+pxl+"'")}var sFunction="flyIn('"+ppl+"',"+xX+","+yY+","+movespeed+")";objppl.tmofn=setTimeout(sFunction,cycle)}}function findObj(B,A){var E,C,D;if(!A){A=document}if((E=B.indexOf("?"))>0&&parent.frames.length){A=parent.frames[B.substring(E+1)].document;B=B.substring(0,E)}if(!(D=A[B])&&A.all){D=A.all[B]}for(C=0;!D&&C<A.forms.length;C++){D=A.forms[C][B]}for(C=0;!D&&A.layers&&C<A.layers.length;C++){D=findObj(B,A.layers[C].document)}if(!D&&document.getElementById){D=document.getElementById(B)}return D}function hideLayer(A){layer=findObj(A);if(layer.style){layer=layer.style}layer.visibility="hidden"}function showLayer(A){layer=findObj(A);if(layer.style){layer=layer.style}layer.visibility="visible"}function GetWindowHeight(){if(typeof window.innerHeight!="undefined"){return window.innerHeight}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientHeight!="undefined"&&document.documentElement.clientHeight!=0){return document.documentElement.clientHeight}else{return viewportheight=document.getElementsByTagName("body")[0].clientHeight}}}function GetWindowWidth(){if(typeof window.innerWidth!="undefined"){return window.innerWidth}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){return document.documentElement.clientWidth}else{return viewportWidth=document.getElementsByTagName("body")[0].clientWidth}}}function createCookie(C,E,D){if(D){var B=new Date();B.setTime(B.getTime()+D);var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+E+A+"; path=/"}function readCookie(B){var D=B+"=";var A=document.cookie.split(";");var F=null;for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){F=E.substring(D.length,E.length)}}return F}function eraseCookie(A){createCookie(A,"",-1)};