var pStr="";

function callJavascript() {
    document.getElementById(flashContainer+"_swf").SetVariable("incoming", "true");
}

function showLegal() {
	document.body.setAttribute("link", "#"+legalColor, false);
	document.body.setAttribute("vlink", "#"+legalColor, false);
	self.legalWindow.style.display = "block";
}

function initContent() {
	self.legal = new Spry.Data.XMLDataSet("http://ad."+self.landURL+"/legal/"+self.legalFile, "legalLines/legal/text",{distinctOnLoad:false,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.display = "none";
	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.appendChild(self.legalWindow);
	
	self.pixFrame=document.createElement("iframe");
	self.pixFrame.setAttribute("id", "pixel", false);
	self.pixFrame.setAttribute("src", "http://ad.jamba.net/int_o_flash/global_items/blank.html", false);
	self.pixFrame.style.display = "none";
	document.body.appendChild(self.pixFrame);
    if (window.location.search) {
        self.affpar = window.location.search.split("?")[1].split("&").join("|").split("=").join(":");
    }else{
		self.affpar = "";	
	}
    setCasale();
    ad_com_pixel();
	if(self.flashEnabled){
		checkFlash(flashURL, flashAltImg, "", flashWidth, flashHeight, flashContainer,  "http://www."+self.landURL+"/jcw/go","");
	}
}
function collectImgPix(strA){
	pStr+=strA;
	document.getElementById(flashContainer+"_swf").SetVariable("incoming", "collectImgPix");
}

function getCookie() {
    var Wert = "";
    if (document.cookie) {
        var affCookie = document.cookie.split(";");
        for (var i in affCookie) {
            if (affCookie[i].indexOf("J_A_Cookie") != -1) {
                var Wertstart = affCookie[i].indexOf("=") + 1;
                var Wertende = affCookie[i].indexOf(";");
                if (Wertende == -1) {
                    Wertende = affCookie[i].length;
                }
                Wert = affCookie[i].substring(Wertstart, Wertende);
            } else {
                Wert = "";
            }
        }
    }
    document.getElementById(flashContainer + "_swf").SetVariable("incomingAffiliate", Wert);
}

function setImgPix(){
	var intPixDiv = document.createElement("div");
	intPixDiv.id="intPixelImgDiv";
	intPixDiv.style["display"]="none";
	intPixDiv.innerHTML = pStr;
	document.body.appendChild(intPixDiv);
	document.getElementById(flashContainer+"_swf").SetVariable("incoming", "scriptPixel");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,'jambaPOPUP','scrollbars=yes,width=640,height=480');
}
