		function load_content(pagetitle,pagestyle) {
//			alert('Hello' + pagetitle + ' ' + pagestyle );
//			"IframeRoot".title = ":::WALA'A::: - " + pagetitle;
//			document.title = ":::WALA'A::: - " + pagetitle;
			document.body.id = pagestyle;			

//			if (parent.document.getElementById('main_div')) {
//				parent.document.getElementById('cont').style.visibility = 'hidden';
//				parent.document.getElementById('cont').width = '1px';
//				parent.document.getElementById('cont').height = '1px';
//				parent.document.getElementById('main_div').innerHTML=document.getElementById('content').innerHTML;
//			}
//			if (!parent.document.getElementById('main_div')) {
//			window.location=('..\index.html') ;
//			}
		}

function NewWin(URL)
{ window.open(URL,"","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=450,height=250,left=350,top=10")
}

function staffSubmit()
	{
		if(Trim(document.thisform.name.value) == "")
		{
			alert("Enter your name");
			document.thisform.name.focus();
			return ;
		}
		if(Trim(document.thisform.txtpass.value) == "")
		{
			alert("Enter your Password");
			document.thisform.txtpass.focus();
			return ;
		}
		document.thisform.action="dbank/login.asp";
		document.thisform.submit();
	}
	
	function mgmntSubmit()
	{
		if(Trim(document.thisform1.name1.value) == "")
		{
			alert("Enter your name");
			document.thisform1.name1.focus();
			return ;
		}
		if(Trim(document.thisform1.txtpass1.value) == "")
		{
			alert("Enter your Password");
			document.thisform1.txtpass1.focus();
			return ;
		}		
		document.thisform1.action="mgmtlogin.asp";
		document.thisform1.submit();
	}
	
function Trim(nStr)
	{
	return nStr.replace(/(^\s*)|(\s*$)/g, "");
	}
	
function StringToHex(str) {
    var result="";
    for (var x=0; x<str.length; x++) {
        var char=str.substr(x, 1);
        var hexchar = AddZero(IntToHex(char.charCodeAt(0)));
        result += hexchar;
    }
    return result;
}
 
function HexToString(hex) {
    var result="";
    for (var x=0; x<hex.length; x+=2) {
        result += String.fromCharCode(parseInt(hex.substr(x, 2), 16))
    }
    return result;
}
 
function IntToHex(num)
{
    if (num < 10)
        return (num+"");
    
    switch (num)
    {
        case 10: return "a";
        case 11: return "b";
        case 12: return "c";
        case 13: return "d";
        case 14: return "e";
        case 15: return "f";
    }
    
    return IntToHex(parseInt(num/16))+IntToHex(parseInt(num%16));
}
 
function AddZero(strValue) {
    return (strValue.length < 2)?("0"+strValue):(strValue);
}

function ConvertAll()
{
	document.getElementById('subject2').value = StringToHex(document.getElementById('subject').value);
	document.getElementById('strname').value = StringToHex(document.getElementById('strname1').value);
	document.getElementById('stremail').value = StringToHex(document.getElementById('stremail1').value);
	document.getElementById('strphone').value = StringToHex(document.getElementById('strphone1').value);
	document.getElementById('strdesc').value = StringToHex(document.getElementById('strdesc1').value);
}