﻿var MainChannel = "p1000.ru"
var Channel = "HomePageP1000Ru";
var AdvHost = (("https:" == document.location.protocol) ? "https://" : "http://");


function WriteWCScript(zone, count) {
    var url = AdvHost + "banner.net-buy.co.il/JS/JS.js?MainChannel=" + MainChannel + "&Channel=" + Channel + "&Zone=" + zone + "&BannerCount=" + count + "&titlernd=" + Math.round(Math.random() * 1000000);
    document.write("<scr" + "ipt type='text/javascript' src='" + url + "'></scr" + "ipt>");
}

function WriteWCIframe(zone, count, width, height) 
{
    var url = AdvHost + "banner.net-buy.co.il/Iframe/Iframe.ashx?MainChannel=" + MainChannel + "&Channel=" + Channel + "Zone=" + zone + "&BannerCount=" + count + "&titlernd=" + Math.round(Math.random() * 1000000);
    document.writeln("<IFRAME WIDTH='" + width + "' HEIGHT='" + height + "' MARGINWIDTH='0' MARGINHEIGHT='0' FRAMEBORDER='0' allowtransparency='true' background-color='transparent' SCROLLING='no' SRC='" + url + "'></IFRAME>");

}
function WriteWeekBanScript(zone, count) {
    var url = AdvHost + "banner.net-buy.co.il/JS/WeekBan.js?MainChannel=" + MainChannel + "&Channel=" + Channel + "&Zone=" + zone + "&BannerCount=" + count + "&titlernd=" + Math.round(Math.random() * 1000000);
    document.write("<scr" + "ipt type='text/javascript' src='" + url + "'></scr" + "ipt>");

}
function WriteFlash(width, heigth, itemid) {
    $("<div id='pof" + itemid + "' ><div>").appendTo("#recommended_products");
    $('#pof' + itemid).flash({ swf: '/images/WeekBan_Flash2.swf', width: 193, height: 193,
        flashvars: { ItemId: itemid }
    },
        { version: 7, wmode: 'opaque' });
}

function CLOSEBIGBAN()
{ $("#BiGban").hide(); }
function OpenBigBan(itemID) {
    if ($('#BiGban').get(0) == undefined) {
        $("<div id='BiGban' ><div>").appendTo("body");  
    }
    $('#BiGban').empty();
    $('#BiGban').
          flash({ swf: '/images/BigWeek_Flash2.swf', width: 593, height: 245,
              flashvars: { ItemId: itemID }
          },
        { version: 7, wmode: 'opaque' });
    var Left = Math.floor($(document).width() - 593) / 2;
    $('#BiGban').css({ position: "fixed", top: 100, left: Left }).fadeIn(200);

}
function GetCouponPolicy()
{
    window.open('/coupon/Ru/taknon_p1000.html');
}

