function initContent() {
    if (window.location.search) {
        self.affpar = window.location.search.split("?")[1].split("&").join("|").split("=").join(":");
    }else{
		self.affpar = "";	
	}
	

    function showLegal() {
		self.legal = new Spry.Data.XMLDataSet("http://ad."+self.landURL+"/legal/"+self.legalFile, "legalLines/legal/text",{distinctOnLoad:true,useCache:false});
        self.legalWindow = document.createElement("div");
		self.legalWindow.setAttribute("id", "legalDiv", false);
		self.legalWindow.setAttribute("spry:region", "legal", false);
		self.legalWindow.setAttribute("class", "legal", false);
		self.legalWindow.style.margin = "auto";
		self.legalWindow.style.width = legalFrameWidth;
		self.legalWindow.style.color = "#"+legalColor;
		self.legalWindow.style.textAlign=legalAlign;
		self.legalWindow.style.fontSize = "10px";
		self.legalWindow.style.fontFamily = "Verdana, Arial, Helvetica, sans-serif";
		self.legalWindow.innerHTML = "{legal::text}";
		document.body.setAttribute("link", "#"+legalColor, false);
		document.body.setAttribute("vlink", "#"+legalColor, false);
		document.body.appendChild(self.legalWindow);
		
    }
	document.getElementById("flowDiv").innerHTML="";
    document.getElementById("flowDiv").style.width = flowFrameWidth;
    document.getElementById("flowDiv").style.height = flowFrameHeight;
    self.flowWindow = document.createElement("iframe");
    self.flowWindow.setAttribute("src", "", false);
    self.flowWindow.setAttribute("scrolling", "no", false);
    self.flowWindow.setAttribute("id", "orderFlow", false);
    self.flowWindow.setAttribute("frameborder", "0", false);
	self.flowWindow.setAttribute("allowtransparency", "true", false);
    self.flowWindow.style.border = "0px solid white";
    self.flowWindow.style.margin = "0px";
    self.flowWindow.style.padding = "0px";
    self.flowWindow.style.width = flowFrameWidth;
    self.flowWindow.style.height = flowFrameHeight;
    self.flowWindow.style.backgroundColor = "transparent";
    document.getElementById("flowDiv").appendChild(self.flowWindow);
	
	
	
    showLegal();
    setCasale();
    ad_com_pixel();
	if(flashEnabled==true) {
		checkFlash(flashURL, flashAltImg, "", flashWidth, flashHeight, flashContainer, "affiliateParameter", "http://www."+self.landURL+"/jcw/go");
	}
	if (typeof(freeProduct)!="undefined") {
		self.f = freeProduct;
	} else {
		self.f = false;
	}
	if (typeof(display_agb)!="undefined") {
		self.displayAGB = display_agb;
	} else {
		self.displayAGB = false;
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function searcher(PNO, DOCID, PARENTID, CONTENTTYPE, AFFPAR) {
    self.flowWindow.setAttribute("src", "frame_content.html?land=" + landURL + "&prodSelected=true&init=" + document.getElementById("flashInit").value + "&adCom=" + self.setAdComPixel + "&adComPixelURL=" + escape(self.adCom_pixel_url) + "&casale=" + document.getElementById("setCasalePixel").value + "&casale_pixel_url=" + escape(document.getElementById("casale_pixel_url").value) + "&pno=" + PNO + "&doc=" + DOCID + "&parentId=" + PARENTID + "&contentType=" + CONTENTTYPE + "&affpar=" + self.affpar + "&cssId=" + self.cssURL + "&aboType=" + self.aboType + "&aboOnly=" + self.aboOnly + "&forcelocale=" + self.forcelocale + "&la=" + self.language+"&freeProduct="+ self.f);
}