var loginhref = '';
	function topfchecknull() {
			if (sBW == "Microsoft Internet Explorer") {
			    var orate = document.all.item("topUsrName");
			    var opwd = document.all.item("topUsrPassword");
			}
			else if (sBW == "Netscape") {
			    var orate = document.getElementById("topUsrName");
			    var opwd = document.getElementById("topUsrPassword");
			}
			var vrate = trim(orate.value);
			if (vrate == ""){
				alert("User Name was not entered !!");
				orate.value = "";
				orate.focus();
				return false;
			}
			else if (trim(opwd.value) == ""){
				alert("Password was not entered !!");
				opwd.value = "";
				opwd.focus();
				return false;
			}
			else{
				return true;
			}
}

function toplogincreatehref(uname, upwd, pgname) {
    if (pgname == '' || pgname == 'home')
        pgname = 'Categories_prebuilt';
    if (pgname.indexOf('&') != -1) {
        pgname = pgname.replace(/&/g, '@*@');
    }
    toploginhref = '../html/index.aspx?page=topmenu&pageurl=' + pgname + '&Submit=TopLogin&UsrName=' + uname + '&UsrPassword=' + upwd ;
 }

function toploginonenter(uname, upwd, pgname) {
    if (topfchecknull()) {
        if (pgname == '' || pgname == 'home')
            pgname = 'Categories_prebuilt';
        if (pgname.indexOf('&') != -1) {
            pgname = pgname.replace(/&/g, '@*@');
        }
        toploginhref = '../html/index.aspx?page=topmenu&pageurl=' + pgname + '&Submit=TopLogin&UsrName=' + uname + '&UsrPassword=' + upwd;
        window.location = toploginhref;
    }
}
 
