поиогите разобратся с JavaScript
мне нужно сделать в js поп андера за место обыкновенной html ссылки на картинку поставить скрипт который булет показывать несколько баннеров в разнобой у меня есть и скрипт поп-андера и скрипт для баннеров чтоб он показывал их в разнабой! но я не могу сделать так чтоб эти два скрипта работали вместе! если кто может помогить пожалуйсто вот сами скрипты:
это поп-андер var ov = false; function GetCookieCMSPopVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookieCMSPop (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 GetCookieCMSPopVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookiePop (name, value) { var argv = SetCookiePop.arguments; var argc = SetCookiePop.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_gelCMSPOP() { day = new Date(); URL = "http://cs-klan-zav.3dn.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(); document.getElementById('popup_divMenuPOPruu').style.display = 'none'; pathname = "/"; myDomain = "/"; var largeExpDate = new Date (); largeExpDate.setTime(largeExpDate.getTime() + (24 * 3600 * 1000)); SetCookiePop('popru','1',largeExpDate, "/"); } function banner_gel(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open('http://cs-klan-zav.3dn.ru/', '" + 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_divMenuPOPruu').style.display = 'none'; pathname = "/"; myDomain = "/"; var largeExpDate = new Date (); largeExpDate.setTime(largeExpDate.getTime() + (24 * 3600 * 1000)); SetCookiePop('popru','1',largeExpDate, "/"); } popru = GetCookieCMSPop('popru'); if (popru == null){ document.write('<div style="position: absolute; top:25%; left:50%; margin-left:-200px; visibility:hidden; z-index:9996570;" id="popup_divMenuPOPruu"><table border="0" width="468" cellspacing="0" cellpadding="0"><tr><td bgcolor="#0780fe" width="300" 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://cs-klan-zav.3dn.ru/">cs-klan-zav.3dn.ru</a></td><td bgcolor="#0780fe"><a style="font-size: 11px; color: #FFFFFF; line-height:20px; font-family: Arial; text-decoration:none;" href="http://cs-klan-zav.3dn.ru/" target="_blank"></a></td><td bgcolor="#0780fe" width="33" style="padding-right: 2px" align="right"><b><a style="font-size: 11px; color: #FFFFFF; line-height:20px; font-family: Arial; text-decoration:none;" onClick="popup_gelCMSPOP();" href="javascript://"><img src="http://cs-klan-zav.3dn.ru/s1/pop_clouse.gif" border="0" alt="" /></a></b></td></tr><tr><td colspan="3" bgcolor="#eeeeee" style="padding: 1 1 1 1px;"><a onClick="banner_gel();" href="javascript://">тут должны быть сслыки на изображения в виде html</A></a></td></tr></table></div>'); document.getElementById('popup_divMenuPOPruu').style.visibility='visible'; if (document.getElementById('popup_divMenuPOPruu').style) window.setInterval("MovePopupWinPOPruu()", 10); window.onerror=null; document.body.scrollTop=10; function MovePopupWinPOPruu() { if (document.body.scrollTop==0) document.getElementById('popup_divMenuPOPruu').style.top=document.documentElement.scrollTop+250; else document.getElementById('popup_divMenuPOPruu').style.top=document.body.scrollTop+250; } } а это скрипт баннеров <script LANGUAGE="JavaScript"> <!-- var z= 3; Banner = new Array(z); Banner[0] = '<A HREF="http://www.dengi.far.ru/"><IMG SRC="http://cs-klan-zav.3dn.ru/111111.gif" ALT="banner1" WIDTH=468 HEIGHT=60 BORDER=2></A>'; Banner[1] = '<A HREF="http://www.dengi.far.ru/"><IMG SRC="http://cs-klan-zav.3dn.ru/6aHep2.gif" ALT="banner2" WIDTH=468 HEIGHT=60 BORDER=2></A>'; Banner[2] = '<A HREF="http://www.dengi.far.ru/"><IMG SRC="http://cs-klan-zav.3dn.ru/Free_arena_47860.jpg" ALT="banner3" WIDTH=468 HEIGHT=60 BORDER=2></A>'; //--> </script> <script LANGUAGE="JavaScript"> <!-- var jetzt=new Date(); var z=(jetzt.getSeconds())%3; document.write(Banner[z]); //--> </script> помогите если кто знает! буду очень признателен |
Часовой пояс GMT +3, время: 22:18. |