function goPop(path,w,h) {
	var ua = navigator.userAgent;
	var height = (ua.indexOf("AppleWebKit") > -1) ? h + 21 : h;
	var url = "/video/index.php?path=" + path + "&width=" + w + "&height=" + h;
	var l = (window.screen.width / 2) - (w / 2 + 10);
	var t = (window.screen.height / 2) - (h / 2 + 40);
	var win2 = window.open(url, "win", "width=" + w + ",height=" + (height+20) + ",status=1,left=" + l + ",top=" + t + ",screenX=" + l + ",screenY=" + t);
	win2.focus();
}

function toggleAccordeonBox (ref) {
	var boxes = document.getElementsByClassName("acc_item_open");
	for(var i = 0; i < boxes.length; i++) {
		boxes[i].className = "acc_item";
	}
	var r = ref;
	r.className = (r.className == "acc_item") ? "acc_item_open" : "acc_item";
}

function openCsLink (ref) {
	var theLink;
	var kids = ref.childNodes;
	for(var i=0; i < kids.length; i++) { 
		if(kids[i].className == "cs_imgbox") {
			var grandkids = kids[i].childNodes;
			for(var j=0; j < grandkids.length; j++) { 
				if(grandkids[j].tagName == "A") {
					theLink = grandkids[j].href;
				}
			}
		}
	}
	location.href = theLink;
	return false;
}

function openKlLink (ref) {
	var theLink;
	var kids = ref.childNodes;
	for(var i=0; i < kids.length; i++) { 
		if(kids[i].tagName == "A") {
			theLink = kids[i].href;
		}
	}
	location.href = theLink;
	return false;
}

function goDisclaimer(url,w,h) {
	var l = (window.screen.width / 2) - (w / 2 + 10);
	var t = (window.screen.height / 2) - (h / 2 + 40);
	var win2 = window.open(url, "popWin", "width=" + w + ",height=" + h + ",status=1,scrollbars=yes,left=" + l + ",top=" + t + ",screenX=" + l + ",screenY=" + t);
	win2.focus();
}