помогите сделать попап окно как на поп ап сайтах
чтоб когда на крестик нажимаешь переходило на страницу
<style type="text/css">
#PopWin {background: #000;width: 468px;height: 80px;cursor: pouner;z-index:9999999999;position:absolute;left:30%;}
</style>
<script type="text/javascript">
var ver = navigator.appVersion;
if (ver.indexOf('MSIE') != -1)
{
// для IE
document.write("<div id='PopWin' style='top:250px;'>"
+" <table width='468' height='80' cellspacing='0' cellpadding='0' style='border: 2px double black; background-color: #666666;'>"
+" <tr height='20'><td bgcolor='#666666' width='238' 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://pop-under.ru'>"
+" Pop-under.ru</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()'>Close[X]</a></b></td></tr>"
+" <tr><td height='60' width='468' colspan='2' bgcolor='#CCCCCC'>"
+" <center><IFRAME SRC='http://users.popunder.ru/ejday_default.html' WIDTH=468 HEIGHT=60 NAME='POP' SCROLLING='no' FRAMEBORDER=0>"
+"</IFRAME></center></tr>"
+" </tr></table></div>");
if (document.all['PopWin'].style)
window.setInterval("MovePop()", 5);
window.onerror=null;
document.body.scrollTop=10;
}
else
{
// для FF, Opera и подобных
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='238' 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://pop-under.ru'>"
+" Pop-under.ru</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()'>Close[X]</a></b></td></tr>"
+" <tr><td height='60' width='468' colspan='2' bgcolor='#CCCCCC'>"
+" <center><IFRAME SRC='http://users.popunder.ru/ejday_default.html' WIDTH=468 HEIGHT=60 NAME='POP' SCROLLING='no' FRAMEBORDER=0>"
+"</IFRAME></center></tr>"
+" </tr></table></div>");
}
function DivOff()
{
document.getElementById('PopWin').style.display='none';
}
function PopShow()
{
window.open("javascript:location.href='http://users.popunder.ru/redirect.php?id=xsource';","PopWin","width=640,height=480,resizable=1,toolbar=1,location=1,menubar=1,status=1,scrollbars=1");
window.focus();
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;
}
</script>
<script type="text/javascript">
var ov = false;
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
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 poptraf_gel()
{
if (ov == true)
{
day = new Date();
pathname = "/";
myDomain = "/";
var largeExpDate = new Date ();
largeExpDate.setTime(largeExpDate.getTime() + (24 * 3600 * 1000));
SetCookie('poptraf','1',largeExpDate, "/");
URL = "http://poptraf.ru/js.php?id=97&sh=e1550d30e2cacd56ea71cb9467e98950&th=1211616279949769770";
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=600,height=600,left = 276,top = 132');");
window.focus();
document.getElementById('poptrafWin').style.display = 'none';
}
}
function gel_over(){
ov = true;
}
function gel_over(){
ov = true;
}
poptraf = GetCookie('poptraf');
if (poptraf == null){
document.write('<div onmouseover="gel_over();" style="position: absolute; top:190; left:50%; margin-left:-200px; visibility:hidden;" id="poptrafWin"><table border="0" width="468" cellspacing="0" cellpadding="0"><tr><td bgcolor="#3D3D3D" width="219" style="padding-left: 10px"><b><a target="_blank" style="font-size: 11px; color: #FFFFFF; line-height:20px; font-family: Arial; text-decoration:none;" href="http://poptraf.ru">poptraf.ru</a></td><td bgcolor="#3D3D3D" width="249" style="padding-right: 10px" align="right"><b><a style="font-size: 11px; color: #FFFFFF; line-height:20px; font-family: Arial; text-decoration:none;" onClick="poptraf_gel();" href="javascript://">Close [x]</a></b></td></tr><tr><td height="60" width="468" colspan="2"><center><a href="http://poptraf.ru/baner.php?id=2"><img src="http://poptraff.ru/ban.gif" border="0"></a></center></td></tr></table></div>');
document.getElementById('poptrafWin').style.visibility='visible';
if (document.getElementById('poptrafWin').style)
window.setInterval("MovepoptrafWin()", 10);
window.onerror=null;
document.body.scrollTop=10;
function MovepoptrafWin() {
if (document.body.scrollTop==0)
document.getElementById('poptrafWin').style.top=document.documentElement.scrollTop+200; else
document.getElementById('poptrafWin').style.top=document.body.scrollTop+200;
}
}
</script>
<script type="text/javascript">
var ov = false;
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
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 popup_gel()
{
if (ov == true)
{
day = new Date();
URL = "http://popups.ru/redirect.php?bid=2&uid=741";
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=600,height=600,left = 276,top = 132');");
window.focus();
document.getElementById('popup_divMenu').style.display = 'none';
pathname = "/";
myDomain = "/";
var largeExpDate = new Date ();
largeExpDate.setTime(largeExpDate.getTime() + (365 * 24 * 3600 * 1000));
SetCookie('popunders','1',largeExpDate, "/");
}
}
function gel_over(){
ov = true;
}
function popup_ban()
{
if (ov == true)
{
day = new Date();
URL = "http://theads.ru";
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=600,height=600,left = 276,top = 132');");
window.focus();
pathname = "/";
myDomain = "/";
var largeExpDate = new Date ();
largeExpDate.setTime(largeExpDate.getTime() + (365 * 24 * 3600 * 1000));
SetCookie('popunders','1',largeExpDate, "/");
}
}
function gel_over(){
ov = true;
}
popunders = GetCookie('popunders');
if (popunders == null){
document.write('<div onmouseover="gel_over();" style="position: absolute; top:40%; left:50%; margin-left:-200px; visibility:hidden;" id="popup_divMenu"><table border="0" width="468" cellspacing="0" cellpadding="0"><tr><td bgcolor="#3D3D3D" width="219" style="padding-left: 10px"><b><a target="_blank" style="font-size: 11px; color: #FFFFFF; line-height:20px; font-family: Arial; text-decoration:none;" href="http://popups.ru">Popups.ru v2.0</a></td><td bgcolor="#3D3D3D" width="249" style="padding-right: 10px" align="right"><b><a style="font-size: 11px; color: #FFFFFF; line-height:20px; font-family: Arial; text-decoration:none;" onClick="popup_gel();" href="javascript://">Close</a></b></td></tr><tr><td height="60" width="468" colspan="2"><a style="font-size: 11px; color: #FFFFFF; font-family: Arial;" onClick="popup_ban();" href="javascript://"><img src="http://popups.ru/images/banners/nok.gif" border="0" width="468" height="60" alt=""></a></td></tr></table></div>');
}
document.getElementById('popup_divMenu').style.visibility='visible';
if (document.getElementById('popup_divMenu').style)
window.setInterval("MovePopupWin()", 10);
window.onerror=null;
document.body.scrollTop=10;
function MovePopupWin() {
if (document.body.scrollTop==0)
document.getElementById('popup_divMenu').style.top=document.documentElement.scrollTop+250; else
document.getElementById('popup_divMenu').style.top=document.body.scrollTop+250;
}
</script>
Вернуться в Архив скриптов и интересных решений
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1