
// --- load frameset if necessary ----
init = function() {
					var locale = location.pathname;
					if (locale.indexOf("/de/")!= -1)
						locale = "de";
					else 
						locale = "en";
					if (!parent.nav) {
							location.href="http://www.schwarzerfreitag.com/" + locale + "/index.php?path=" + location.pathname;
							}
					}




// --- navigation highlighting  ----
var currItem = 0;
function setNav(node) {
    document.getElementById(currItem).firstChild.setAttribute("class","deact");
    currItem = node.parentNode.getAttribute("id");
    node.setAttribute("class","active",0);
}

// --- clears/displays inputfield text -----
function checkVal(el,val,cursor) {
	if (cursor) {
		if (el.value==val)
		el.value = "";
	} else {
		if (el.value=="")
		el.value=val;
	}
}

// -------- opens large image in new window -------------
var postfix = "_large";
function showLarge(node) {
	var url = node.firstChild.getAttribute("src");
    var type = url.substring(url.length-4);
    var newPostfix = postfix + type;
    url = url.replace(type, newPostfix)
	var popup = window.open(url,'','width=450,height=650,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	popup.focus();
}

onload = init;