if (navigator.userAgent.indexOf('Win') != -1){ var bEnableCookieCheck = false; var bEnableMoving = false; var bShow; var objFlashWidth = 620; var objFlashHeight = 386; var expDays = 1; var page = "publicidad1.htm"; var windowprops = "width=220,height=320,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes"; function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function DeleteCookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); var cval = GetCookie (name); document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); } var exp = new Date(); exp.setTime(exp.getTime() + (expDays*24*60*60*1000)); function amt(){ var count = GetCookie('tele') if(count == null) { SetCookie('tele','1') return 1 } else { var newcount = parseInt(count) + 1; DeleteCookie('tele') SetCookie('tele',newcount,exp) return count } } function getCookieVal(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function checkCount() { var count = GetCookie('tele'); if (count == null) { count=1; SetCookie('tele', count, exp); bShow=true; } else { count++; SetCookie('tele', count, exp); } } var windowHeight = window.screen.availHeight; var windowWidth = window.screen.availWidth; var arrayPoints = new Array(); checkCount(); arrayPoints[0] = new Array(2); arrayPoints[1] = new Array(2); arrayPoints[2] = new Array(2); arrayPoints[3] = new Array(2); arrayPoints[4] = new Array(2); arrayPoints[0][0]=5;//start point arrayPoints[0][1]=5; arrayPoints[1][0]=500; arrayPoints[1][1]=400; arrayPoints[2][0]=830; arrayPoints[2][1]=400; arrayPoints[3][0]=200; arrayPoints[3][1]=10; arrayPoints[4][0]=400; arrayPoints[4][1]=930;//end point var last_X = arrayPoints[0][0]; var last_Y = arrayPoints[0][1]; var posIndex = 0; var addOffset = 0; var count=0; var constOffset=100; var repeat_time=40;//ms var noDIV=false; function divMoveTo(layerID, xpos, ypos) { if(document.layers) { document.layers[layerID].moveTo(xpos, ypos); } else{ document.getElementById('moveDiv').style.left = xpos; document.getElementById('moveDiv').style.top = ypos; } } function closediv(){ /*if(document.layers) { document.layers['moveDiv'].visibility="hidden"; } else{ document.getElementById('moveDiv').style.display="none"; } */ if(document.all) { document.getElementById('moveDiv').style.display="none"; } else{ window.close(); } } function startDIV(){ if(document.layers) { if(!document.layers['moveDiv']){ noDIV=true; } } else{ if(!document.getElementById('moveDiv')){ noDIV=true; } } if(noDIV){ alert("Image does not exist."); return; } if(count==0){ arrayPoints[posIndex][1] = last_Y; arrayPoints[posIndex][0] = last_X; addOffset = parseInt((arrayPoints[posIndex+1][0]-arrayPoints[posIndex][0])/constOffset); } if (countwindowWidth){ xPos=windowWidth - objFlashWidth; } if((yPos + objFlashHeight)>windowHeight){ yPos=windowHeight - objFlashHeight; } last_X = xPos; last_Y = yPos; divMoveTo('moveDiv',xPos,yPos); window.setTimeout("startDIV()", repeat_time); } else{ ++posIndex; if(posIndex>=(arrayPoints.length-1)){ closediv(); } else{ count=0; window.setTimeout("startDIV()", repeat_time); } } } function playFlash(){ document.cracked_MOD.play(); } if(bShow){ if(document.all) { //************************************************************* //************* watch for PARAM 'transparent' !!! ************* //************************************************************* document.write('
'); document.write(''); document.write(''); document.write(''); document.write('') document.write(''); document.write(''); document.write(' '); document.write(' '); document.write('
'); } /* else if(document.layers){ } else{ document.write('
'); document.write(' '); document.write(' '); document.write(' ') document.write('
'); } */ } /* if(document.layers){ if(bShow){ showPopup(); } } else{ if(bShow){ window.setTimeout("startDIV()",500); playFlash(); } } */ if(document.all){ //code for moving the DIV //alert("show flash div"); } else{ if(bShow){ showPopup(); } } }