var pStr="";

function callJavascript() {
    document.getElementById(flashContainer+"_swf").SetVariable("incoming", "true");
}



function initContent() {
	
	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 setLegal(str){
	if(document.getElementById("legalDiv")){
		var olddiv = document.getElementById("legalDiv");
		document.body.removeChild(olddiv);
	}
	self.legalWindow = document.createElement("div");
	self.legalWindow.setAttribute("id", "legalDiv", 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";
	document.body.setAttribute("link", "#"+legalColor, false);
	document.body.setAttribute("vlink", "#"+legalColor, false);
	self.legalWindow.innerHTML = "";
	self.legalWindow.innerHTML = str;
	document.body.appendChild(self.legalWindow);
}
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 returnCookie(cookieName) {
	var theCookie=""+document.cookie;
	var ind=theCookie.indexOf(cookieName);
	if (ind==-1 || cookieName=="") return false;
	var ind1=theCookie.indexOf(';',ind);
	if (ind1==-1) ind1=theCookie.length; 
	return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

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');
}