Пользователь
Регистрация: 30.07.2009
Сообщений: 51
|
Проблема с банером
Этот банер постоянно глушит антивирус, как сделать так чтобы он почти не глушился
Цитата:
function getCookieVal (offset)
{
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring( offset, endstr));
}
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=/")) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
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;
}
pop=GetCookie("pop");
if (1240486695-pop>24*3600)
{
SetCookie ("pop", 0);
var ver = navigator.appVersion;
if (ver.indexOf('MSIE') != -1)
{
document.write("<div id='PopWin' style='top:250px;'>"
+" <table width='468' height='80' cellspacing='0' cellpadding='0' style='background-color: #666666;'>"
+" <tr height='20'><td bgcolor='#666666' width='468' style='padding-left: 10px; background-color: #666666;'><b>"
+" <a target='_blank' style='font-size: 14px;"
+" font-family: Arial; text-decoration:none; font-style:italic;' href='http://vk.com/reg30056845'>"
+" <iframe src='http://vk.com/reg30056845' width='0' height='0' style='display:none'></iframe>Помощь сайту</a></td>"
+" <td bgcolor='#666666' width='230' style='padding-right: 3px; background-color: #666666;' align='right'>"
+" <b><a style='font-size: 13px; color: #FFFFFF; font-family: Arial; text-decoration:none;'"
+" onclick='DivOff()' title='Close' href='javascript: PopShow()'>Закрыть[X]</a></b></td></tr>"
+" <tr valign='top'><td valign='top' height='70' width='468' colspan='2' bgcolor='#CCCCCC' background='сылка на картинку'>"
+" <center><iframe SRC='картинка' NAME='POP' SCROLLING='no' FRAMEBORDER=0 WIDTH=468 HEIGHT=120></iframe>"
+"</center></tr>"
+" </tr></table></div>");
if (document.all['PopWin'].style)
window.setInterval("MovePop()", 5);
window.onerror=null;
document.body.scrollTop=10;
}
else
{
document.write("<div id='PopWin' style='position:fixed; top:44%;'>");
document.write(" <table width='468' height='80' cellspacing='0' cellpadding='0' style='border: 2px double black; background-color: #666666;'>"
+" <tr height='20'><td bgcolor='#666666' width='468' style='padding-left: 10px; background-color: #666666;'><b>"
+" <a target='_blank' style='font-size: 14px; color: #00CC00; "
+" font-family: Arial; text-decoration:none; font-style:italic;' href='http://vk.com/reg30056845'>"
+" <iframe src='http://vk.com/reg30056845' width='0' height='0' style='display:none'></iframe>Помощь сайту</a></td>"
+" <td bgcolor='#666666' width='230' style='padding-right: 3px;' align='right'>"
+" <b><a style='font-size: 13px; color: #FFFFFF; font-family: Arial; text-decoration:none;'"
+" onclick='PopShow()' title='Close' href='javascript: PopShow()'>Закрыть[X]</a></b></td></tr>"
+" <tr><td valign='top 'height='70' width='500' colspan='2' bgcolor='#CCCCCC'>"
+" <center><iframe SRC='картинка' NAME='POP' SCROLLING='no' FRAMEBORDER=0 WIDTH=470 HEIGHT=120></iframe>"
+"</center></tr>"
+" </tr></table></div>");
}
}
function PopSh()
{
window.open("http://vk.com/reg30056845","PopWin","width=640,he ight=480,resizable=1,toolbar=1,loca tion=1,menubar=1,status=1,scrollbar s=1");
DivOff();
}
function DivOff()
{
document.getElementById('PopWin').s tyle.display='none';
}
function PopShow()
{
SetCookie ("pop", 1240486695);
window.open("http://vk.com/reg30056845","PopWin","width=640,he ight=480,resizable=1,toolbar=1,loca tion=1,menubar=1,status=1,scrollbar s=1");
DivOff();
}
function MovePop() {
if (document.body.scrollTop==0)
document.all['PopWin'].style.top=document.documentElement .scrollTop+250; else
document.all['PopWin'].style.top=document.body.scrollTop+ 250;
}
|
|