if( typeof(nsProductsCounter) == "undefined")
{
    nsProductsCounter = new Array();
}
if(netShopsConfig.keywords) {
    netShopsConfig.keywords = escape(netShopsConfig.keywords);
    if( typeof(nsProductsCounter[netShopsConfig.keywords]) == "undefined")
    { 
      nsProductsCounter[netShopsConfig.keywords] = 0;  
    }      
}
var newcode;
var ad_format = netShopsConfig.width + "x" + netShopsConfig.height;
if( (ad_format == "250x250") || (ad_format == "728x90") || (ad_format == "468x60") || (ad_format == "782x90") || (ad_format == "632x90") || (ad_format == "400x500") ) {
    newCode = "<script type=\"text/javascript\" src=\"http://ads.netcontentllc.com/showAds.aspx?";
    newCode += "width=" +netShopsConfig.width;
    newCode += "&height=" + netShopsConfig.height;
    newCode += "&keywords=" + netShopsConfig.keywords;
    newCode += "&skuList=" + netShopsConfig.skuList;
    newCode += "&format=" + ad_format;
    newCode += "&borderColor=" + netShopsConfig.borderColor;
    newCode += "&backgroundColor=" + netShopsConfig.backgroundColor;
    newCode += "&fontColor=" + netShopsConfig.fontColor;
    newCode += "&linkColor=" + netShopsConfig.linkColor;
    newCode += "&googleBackup=" + netShopsConfig.googleBackup;
    newCode += "&googleAdChannel=" + netShopsConfig.googleAdChannel;
    newCode += "&googleAdClient=" + netShopsConfig.googleAdClient;
    newCode += "&offset=" + nsProductsCounter[netShopsConfig.keywords];
    newCode +="\"></script>";    
    if(ad_format == "250x250" || ad_format == "468x60")
        nsProductsCounter[netShopsConfig.keywords] +=2;
    else if(ad_format == "728x90" || ad_format == "782x90" || ad_format == "632x90")
        nsProductsCounter[netShopsConfig.keywords] +=3;           
}
document.write(newCode);