browserVer = 1;

ie4up = false;
ns4up = false;
ns6up = false;

function openwinNoScroll(file,wide,high,name) {
var winl = (screen.width - wide) / 2;
var wint = (screen.height - high) / 8;
window.open(file, name,"width="+ wide+",height="+high+",top="+wint+",left="+winl+", status=no,toolbar=no,menubar=no,location=no,scrollbars=0,resizable=no");
}

function openwin(file,wide,high,name) {
	var winl = (screen.width - wide) / 2;
	var wint = (screen.height - high) / 8;
	window.open(file, name,"width="+ wide+",height="+high+",top="+wint+",left="+winl+", status=no,toolbar=no,menubar=no,location=no,scrollbars=1,resizable=no");
}

function URLopen() {
	if  (document.show_form.showselect.length > 1 ){
	var tStr = document.show_form.showselect.value;
	tStr2=tStr.toLowerCase()
	var pos = tStr2.indexOf("javascript:");
	if (pos > -1){
		eval(tStr);
	}else{
		if (tStr.length >1 ){
			document.location.href = tStr;
		}	
	}	
	}
}

function OpenMediaPlayer(intSiteId, intCatId, intClipId) {
		var theURL="http://www.mnet.co.za/globaltools/MediaPlayer/OpenMediaplayer.asp?GlobalSiteID=" + intSiteId;
		if( intCatId != null ) theURL += "&GlobalMediaCategoryId=" + intCatId;
		if( intClipId != null ) theURL += "&GlobalMediaClipId=" + intClipId;
		wname ="ChromelessMediaPlayer";
		W=632;
		H=256;
		xWinPos = (parseInt(screen.width) - parseInt(W))/2;
		yWinPos = ((parseInt(screen.height) - parseInt(H))/2)-30;
		var wFeatures = "scrollbars=yes, width=" + W + ", height=" + H + ", top=" + yWinPos + ", left=" + xWinPos + "";
		window.open( theURL, wname, wFeatures );
}

function OpenMnetMediaPlayer(intMediaID) {
		var theURL="http://www.mnetafrica.co.za/mnetmedia/MnetMediaPlayer.asp?ID=" + intMediaID;
		wname ="MnetMediaPlayer";
		W=390;
		H=450;
		xWinPos = (parseInt(screen.width) - parseInt(W))/2;
		yWinPos = ((parseInt(screen.height) - parseInt(H))/2)-30;
		var wFeatures = "scrollbars=yes, width=" + W + ", height=" + H + ", top=" + yWinPos + ", left=" + xWinPos + "";
		window.open( theURL, wname, wFeatures );
}

function getCheckedValue(form_name) {
	radioObj = eval('document.' + form_name + '.pollOption');
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	}
	else {
		for(var i = 0; i < radioLength; i++) {
			if(radioObj[i].checked) {
				return radioObj[i].value;
			}
		}
	}
	return "";
}
function popthepoll(questionid,showid,channelinc){
	var optionid = getCheckedValue('form_poll');
	openwin(channelinc+'PollResults.asp?QuestionId='+questionid+'&Showid='+showid+'&OptionId='+optionid+'',410,314,'pollResults');
}

function categorychange(form,field,target){
	var value = eval('document.'+form+'.'+field+'.value');
	var loc = target+'&'+field+'='+value;
	document.location = loc;
	
}

function Page(form,WhatPage){	
	//eval('document.'+ form + '.CurrentPage.value') = WhatPage;	
	eval('document.'+ form + '.CurrentPage.value = ' + WhatPage);
	eval('document.'+ form + '.submit()');
}

