var openwindow;
var openwindow1;
var isIE = document.all?true:false;
var isNS = document.layers?true:false;
function onlyDigits(e,decReq) {
    var key = (isIE) ? window.event.keyCode : e.which;
    var obj = (isIE) ? event.srcElement : e.target;
    var isNum = (key > 47 && key < 58) ? true:false;
    var dotOK = (key==46 && decReq=='decOK' && (obj.value.indexOf(".")<0 || obj.value.length==0)) ? true:false;
    window.event.keyCode = (!isNum && !dotOK && isIE) ? 0:key;
    e.which = (!isNum && !dotOK && isNS) ? 0:key;
    return (isNum || dotOK);
}
function GenerarPassword(winame,comm){
	var commands	= comm.split(",");
	var lan		= parent.list.document.linkl.lan.value;
	var appid	= parent.list.document.linkl.appid.value;
        var clase       = parent.list.document.linkl.clase.value;
	var id		= document.linkf.i8_user_id.value;
	var win         = "window.open('/cgi-bin/"+appid+"/pl/"+commands[0]+".pl?lan="+lan+"&appid="+appid+"&clase="+clase+"&id="+id+"','"+commands[0]+clase+"','left=50,top=50,width=10,height=10,scrollbars=no,toolbar=no,menu=no')";
	eval(win);
}
function LoadFrame(){}
function openUserClone(){
	if (!openwindow || openwindow.closed){
		var lan		= parent.list.document.linkl.lan.value;
		var appid	= parent.list.document.linkl.appid.value;
		var id		= document.linkf.i8_user_id.value;
		var v32_fname	= document.linkf.v32_fname.value;
		var v32_lname	= document.linkf.v32_lname.value;		
		win ="window.open('/cgi-bin/"+appid+"/pl/user.clone.open.pl?lan="+lan+"&appid="+appid+"&id_source="+id+"&v32_fname="+v32_fname+"&v32_lname="+v32_lname+"','','left=300,top=200,width=400,height=200,scrollbars=no,toolbar=no,menu=no,statusbar=no')";
		openwindow=eval(win);
	}
	else{openwindow.focus()}
}
function OpenUserOptions(){
	if (!openwindow1 || openwindow1.closed){
		var lan		= parent.list.document.linkl.lan.value;
		var appid	= parent.list.document.linkl.appid.value;
		var clase       = "user_options_permissions";
		var id		= document.linkf.i8_user_id.value;
		win ="window.open('/cgi-bin/"+appid+"/bin/prof.pl?lan="+lan+"&appid="+appid+"&clase="+clase+"&id="+id+"','','left=50,top=50,width=800,height=600,scrollbars=yes,toolbar=no,menu=yes,statusbar=no')";
		openwindow1=eval(win);
	}
	else{openwindow1.focus()}
}
