// javascript

//    ------------popuptraf.ru-------------
//document.write('<script language="JavaScript" src="http://popuptraf.ru/script/js.php?id=10153"></script>');
//    ------------popuptraf.ru-------------
//    ------------banersFor5ka-------------
document.write('<script language="JavaScript" src="/js/popunder.js"></script>');
//    ------------banersFor5ka-------------

//    ------------banner-in.net-------------
document.write('<script language="javascript" src="http://banner-in.net/2247.js"></script>');
//    ------------banner-in.net-------------

window.onload = initPage;
SetCookie('infobar', '1', '0.5'); // XXX disable infobar
function openDownload(filename){
    win=window.open('','download','height=500,width=620');
    win.document.write('<html><head><style>BODY{padding:0;margin:0}</style></head><body><table width="100%">');
    win.document.write('<tr><td height="190" align="center"><iframe src="/jscr/download1.html" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" width="600" height="190"></iframe></td></tr>');
    win.document.write('<tr><td height="100" align="center"><a style="font-size:30px;" href="'+filename+'">Скачать файл</a></td></tr>');
    win.document.write('<tr><td height="190" align="center"><iframe src="/jscr/download2.html" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" width="600" height="190"></iframe></td></tr>');
    win.document.write('</table></body></html>');
    win.document.close();
    win.focus();
}
function initPage(){
 // alert(1);
    return true;
}



function SetCookie(name, value, days){
var today = new Date();
expires = new Date(today.getTime() + days*24*60*60*1000);
document.cookie = name + "=" + escape(value) +"; path=/; expires=" + expires.toGMTString();
}

function infobaroff()
{
document.all.ibp.style.visibility = "hidden";
document.all.ibp.style.display = "none";


SetCookie('infobar', '1', '0.5');

//eraseCookie("popup");
if(!readCookie("popup5-ka")){
  createCookie("popup5-ka",1,0.25);
  window.open("http://www.referatik.com.ua","_blank","width=300,height=300,resizable=yes,status=yes,directories=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes");
}

function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}

function eraseCookie(name) {
    createCookie(name,"",-1);
}


}

