
<!--hide this script from non-javascript-enabled browsers

var message="Sorry, that function is disabled."; // Message for the alert box
function click(e) {
	if (document.all) {
		if (event.button == 2) {
			alert(message);
			return false;
		}
	}
	if (document.layers) {
		if (e.which == 3) {
		alert(message);
		return false;
		}
	}
}
//if (document.layers) {
//	document.captureEvents(Event.MOUSEDOWN);
//}
//document.onmousedown=click;

function HandleCat(f) {
	//alert ("hello")
	var form =document.forms["frmCtgry"]
	var tFlag
	for(var i=0;i<form.ctgryI.length;i++)
	{
		if(form.ctgryI[i].selected)
		{
		if (form.ctgryI[i].value =="-1")
		{
		alert("Please select a channel.")
		return false
		}
		}
	  
	}
	return true
}

function chkSearchStr(f) {

	var whitespace = new String(" \t\n\r");
	var s = document.frmSrch.txtSrchStr.value;
	if (whitespace.indexOf(s.charAt(0)) != -1) {
      var j=0, i = s.length;
      while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
         j++;
      s = s.substring(j, i);
    }
	if (s=="") {
		alert("Please enter a search.");
		return false;
	}
	else { 
		return true;
	}	
}
		
function checkInp(f) {
	//alert("window.screen.availWidth: " +  window.screen.availWidth + "\n" + "window.screen.availHeight: " +  window.screen.availHeight);
	//document.frmLgn.winWd.value = window.screen.availWidth
	//document.frmLgn.winHt.value = window.screen.availHeight
	//alert (document.frmLgn.winWd.value + ", " + document.frmLgn.winHt.value)
	if ((document.frmLgn.UsrN.value == "") || (document.frmLgn.UsrN.length == 0)) {
		alert("Please enter your username.")
		return false;
	} else {
	if ((document.frmLgn.Pwd.value == "") || (document.frmLgn.Pwd.length == 0)) {
		alert("Please enter your password.")
		return false
	} else {
		return true
	}
	}
}
		

function open_window(url,name,features){
	popup=window.open(url,name,features);
	if (window.focus)
		popup.focus();
}

function PPWin() {
	PPWind=window.open("","PPWind","resize=no,toolbar=no,scrollbars=yes,width=400,height=300")
}

function UAWin() {
	UAWind=window.open("","UAWind","resize=no,toolbar=no,scrollbars=yes,width=400,height=300")
}
function CAWin() {
	CAWind=window.open("","CAWind","resize=no,toolbar=no,scrollbars=yes,width=400,height=300")
}

//for page select box in Sub SortingPgHeading in SortHeading.asp
function GoToPage(form, CurrPage) {
	
	var selIndex;
	for (x=0; x<form.elements.length; x++) {
		if (form.elements[x].name=="selPage") {	//normally there are 2 select controls called selPage (located Top and Bottom of page)
			selIndex=x;							//if Top control is used it's selected page will be != to CurrPage otherwise it will be = to CurrPage, in which case this loop will not break and will continue on to find the 2nd (bottom) control and use selected value of that control
			if (CurrPage
			!=form.elements[x].options[form.elements[x].selectedIndex].value) {	
				break;
			}	
		}
	}
	form.action=form.action + "&PageNum=" + form.elements[x].options[form.elements[x].selectedIndex].value;
	form.submit();
}

function GoToPage_2(form, CurrPage) {

/*var selIndex;
	for (x=0; x<form.elements.length; x++) {
		if (form.elements[x].name=="selPage") {	//normally there are 2 select controls called selPage (located Top and Bottom of page)
			selIndex=x;							//if Top control is used it's selected page will be != to CurrPage otherwise it will be = to CurrPage, in which case this loop will not break and will continue on to find the 2nd (bottom) control and use selected value of that control
			if (CurrPage!=form.elements[x].options[form.elements[x].selectedIndex].value) {	
				break;
			}	
		}
	}
*/	
//	form.action=form.action + "&PageNum=" + form.elements[x].options[form.elements[x].selectedIndex].value;
//	form.action=form.action + "&PageNum=" + form.selPage.options[form.selPage.selectedIndex].value;
	//(( chage))form.action=form.action + '&PageNum=' + document.all.selPage.options[document.all.selPage.selectedIndex].value;
		alert(form.selPage.options[form.selPage.selectedIndex].value);
		form.action=form.action + '&PageNum=' + form.selPage.options[form.selPage.selectedIndex].value;
		alert(form.action);
		location.replace(form.action);
//	form.submit();
}
	
//for page select box in Sub SortingPgHeading in SortHeading.asp
function GoToPage2(form) {
//	form.PageNum.value = document.all.selPage.value;
	form.PageNum.value = form.selPage.value;
	form.submit();
}


//-->