function IEonkeypress() {
if ((window.event.keyCode >=48) && (window.event.keyCode <=57) || (window.event.keyCode ==32))
	{
	window.event.returnValue = true;
	}else{ window.event.returnValue = false;}
}

function Netonkeypress(e) {
var key;
  key = e.which
  		if ((key>=48) && (key<=57) || (key==8) || (key==32) || (key==45)) 
			{return true;} else
			{return false;}
}


function EditBox(oText,oEdit)
{
 oText.style.visibility = "hidden";
 oEdit.style.visibility = "";
} 


function isEm(str)
{
//var str = param.value  
return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
return  (!r1.test(str) && r2.test(str));  
} 



function Qlogout (tobject){
tobject.value="";
window.location.href = "logout.asp";
}

function window_onload() {
var coll = window.document.all;
if (coll!=null) {
    for (i=0;i<coll.length; i++) 
        if (coll.item(i).name == 'txt'){
				if (coll.item(i).value=='') {
					window.navigate ("admin.asp");	
				} //if value 
	            } //if in
	            } //if out 
	            
var cols = window.document.form1.txt  
	if (cols.value==''){
	window.location.href = "admin.asp";
}
}

function ChangeImage(nagan,pic)
{window.document.all.item(nagan).srcelement = pic;}
