/*
	JavaScriptIncludeFile fuer www.teddyaward.org
	CopyRight:	EtienneWebDesign
				Stephan Binder (etienne@metasurfer.de)
*/ 

/*
Beispiel für WindowsAttribute:
('URL','Name','scrollbars=yes,width=640,height=440,top=30,left=50,resizable=yes')
*/

//        function Go(x)
//        {
//		   		parent.parent.location.href = x;
//        }

function Seitenaufruf(url) {
	document.location.href = url;
}

//
//
		
function EWD_openWinTodayDE(theURL,winName,attribs) {
	WinDe = window.open(theURL,winName,attribs);
	WinDe.focus();
}

function EWD_openWinTodayEN(theURL,winName,attribs) {
	FensterEn = window.open(theURL,winName,attribs);
	FensterEn.focus();
}

function EWD_openWin(theURL,winName,attribs) {
	window.open(theURL,winName,attribs);
}

function EWD_StatusMsg(message) {
	status=message;
	document.returnValue = true;
}

function EWD_filmarchivChange(selObj,restore,init) {
	if (init) {
		parent.location="frameset.php?item=gewinner&jahr=" + selObj.options[selObj.selectedIndex].value;
	}
	else {
		document.location="inhalt.php?jahr=" + selObj.options[selObj.selectedIndex].value;
	}
	if (restore) selObj.selectedIndex=0;
}

function EWD_jury_archiv(selObj,restore,init) {
	if (init) {
		parent.location="frameset.php?item=jury&archiv=1&jahr=" + selObj.options[selObj.selectedIndex].value;
	}
	else {
	document.location = "inhalt.php?archiv=1&jahr=" + selObj.options[selObj.selectedIndex].value;
	}
	if (restore) selObj.selectedIndex=0;
}

function EWD_galerie_stars(selObj,restore,init) {
	if (init) {
		parent.location="frameset.php?item=galerie_stars&jahr=" + selObj.options[selObj.selectedIndex].value;
	}
	else {
		document.location = "inhalt.php?jahr=" + selObj.options[selObj.selectedIndex].value;
	}
	if (restore) selObj.selectedIndex=0;
}

function EWD_galerie_winner(selObj,restore,init) {
	if (init) {
		parent.location="frameset.php?item=galerie_winner&jahr=" + selObj.options[selObj.selectedIndex].value;
	}
	else {
		document.location = "inhalt.php?jahr=" + selObj.options[selObj.selectedIndex].value;
	}
	if (restore) selObj.selectedIndex=0;
}

function EWD_diary(selObj,restore) {
	document.location = "inhalt.php?jahr=" + selObj.options[selObj.selectedIndex].value;
	if (restore) selObj.selectedIndex=0;
}

function EWD_openImg(image,titel,copyright,hoehe,breite) {
	var loc = "inc/showimage.php?image=" + image + "&titel=" + titel + "&copyright=" + copyright;
	var attrib = "height=" + hoehe + ",width=" + breite + ",top=15,left=15";
	window.open(loc, "bild", attrib);
//	self.focus;
}

function EWD_promo_tickets(language) {
	var loc = "main/ticketpromo_" + language + ".php";
	var attrib = "scrollbars=yes,height=480,width=760,top=15,left=15";
	window.open(loc, "ticketpromo", attrib);
	
}

function EWD_promo(n) {
	EWD_promo_standard(n,1);
//	EWD_promo_blink_aus();
}

function EWD_promo_standard(m,n) {
//	alert("promo_" + n);
//	var max_id = n;
	document.getElementById("promo_" + n).style.color = "#EEEE00";
	n = n+1;
//	alert("promo_" + n);
	if (n > m) { n = 1; }
	document.getElementById("promo_" + n).style.color = "#66FFFF";
	var f_name = "EWD_promo_standard(" + m + "," + n + ")";
//	alert(f_name);
	window.setTimeout(f_name,1400);
}

function EWD_promo_blink_ein() {
	document.getElementById("today").style.color = "#66FFFF";
	window.setTimeout("EWD_promo_blink_aus()",1400);
}

function EWD_promo_blink_aus() {
	document.getElementById("today").style.color = "#EEEE00";
	window.setTimeout("EWD_promo_blink_ein()",1400);
}

function zurueck() {
	window.opener.parent.frames[1].location.reload();
	self.close();
}
