function setSidebar(){
	var p_description = "Sidebar";
	var p_title = "Sidebar";
	var p_url = "http://www.heute.de/ZDFheute/sidebar/0,3662,,00.html";

	if (document.all && !window.opera){ //IE5+
		void(_search=open(p_url ,'_search'));
	}
	else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')){ //Gecko
		window.sidebar.addPanel (p_title, p_url, '');
	}
	else { //anything else
		window.open (p_url,p_title,'width=157,height=600');
	}
}


function redirto(id) {
	if (isNaN(id)) {
		//if the id is not numeric - handle it as it where an url - needed eg. for the heute link
		document.location.href=id;
	} else {
		if (id!='1000000') document.location.href='http://www.zdf.de/ZDFde/inhalt/' + id % 32 + '/0,1872,' + id + ',00.html';
	}
}

function testIsValidObject(objToTest) {
	if (null == objToTest) {
		return false;
	}
	if ("undefined" == typeof(objToTest) ) {
		return false;
	}
	return true;
}

function changeZappelImageVisibility(whichSheet) {
	var zappelImage = document.getElementById("zappel-image");
	if (whichSheet == 'main') {
		if (testIsValidObject(zappelImage)) zappelImage.style.display = "none";
	} else {
		if (testIsValidObject(zappelImage)) zappelImage.style.display = "block";
	}
}

function changeWahlImageVisibility(whichSheet) {
	var wahlImage = document.getElementById("wahl-image");
	if (whichSheet == 'main') {
		if (testIsValidObject(wahlImage)) wahlImage.style.display = "none";
	} else {
		if (testIsValidObject(wahlImage)) wahlImage.style.display = "block";
	}
}


