// JScript File
function CPCLick(tmp){
    if(tmp == "lbMBL"){
        if(document.getElementById("uname").value.length < 4){
            document.getElementById("lerror").innerHTML = "Please enter your username in the field provided."
        } else {
            if(document.getElementById("pswd").value.length < 4){
                document.getElementById("lerror").innerHTML = "Please enter your password in the field provided."
            } else {
                document.getElementById("hfUN").value=document.getElementById("uname").value
                document.getElementById("hfPW").value=document.getElementById("pswd").value
                __doPostBack(tmp, '')
            }
        }
    } else {
        __doPostBack(tmp, '')
        //document.getElementById(tmp).click()
    }
}
function ChangePage(tmp){
    shContent.MoveToPanel(tmp)
}
function LoadPodcast(tmp){
    document.getElementById("hfPC").value=tmp
    document.getElementById("lbGOPC").click()
}
function DownloadFile(tmp){
    if (parseInt(navigator.appVersion)>3) {
		screenW = screen.width
		screenH = screen.height
	} else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)==3 && navigator.javaEnabled()) {
		var jToolkit = java.awt.Toolkit.getDefaultToolkit()
		var jScreenSize = jToolkit.getScreenSize()
		screenW = jScreenSize.width
		screenH = jScreenSize.height
	}
	sw = (screenW - 600) / 2
	sh = (screenH - 400) / 2
	window.open ("download.aspx?fid=" + tmp, "", "width=200,height=200,top=" + sh + ",left=" + sw + ",toolbar=0,scrollbars=0,resizable=0")
}
function Register(){
    CPR.Open()
}
function Subscribe(tmp){
    CPS.setUrl("subscribe.aspx?pcg=" + tmp)
    CPS.Open()
}
function FinishRegistration(){
    CPR.Close()
    document.getElementById("FReg").click()
}
function CheckEnterKeyOnSearch(e){
    var evt = e ? e : window.event;
    if (evt.keyCode == 13){
        document.getElementById("hfSH").value = document.getElementById("tbSearch").value
        document.getElementById("tbSearch").value = ""
       document.getElementById("btnSearch").click()
       return false;
    }
}
function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}