function onL(){top.document.form1.login.focus()};
function aLr(){alert(parent.textvar[1]);parent.bcheck('login').value='';parent.bcheck('pw').value=''};
function jLgI(elm){elm.value='';elm.style.color='#000000'};
function jSwap(elm){elm.style.display='none';BCk('swapTbl').style.display=''};
function Validate() {
	if(!document.form1.login.value){alert(textvar[6]+': '+textvar[4]);document.form1.login.focus();return false}
	else if(!document.form1.pw.value){alert(textvar[6]+': '+textvar[5]);document.form1.pw.focus();return false}
	else{vA='abcdefghijklmnopqrstuvxyz0123456789';R='';
		for(i=0;i<7;i++){R+=vA.substr(Math.floor(Math.random()*35),1)};BCk('uplAdmLogin').value=(R)
	};
};
function check_signs(field){
	var valid=" '";ok="yes";var temp;
	for(i=0;i<field.value.length;i++){temp=""+field.value.substring(i,i+1);if(valid.indexOf(temp)!="-1")ok="no"}
	if(ok=="no"){alert(textvar[1]);field.focus(this);field.select()}
};
function jLogin(){
	setTimeout('onL()',100)
	return(
		 '<FORM TARGET=misc_iframe METHOD=post ACTION=comansy.asp NAME=form1 ID=form1 onSubmit="return Validate()">'
		+'<TABLE ID=loginTbl ALIGN=center>'
			+'<TR>'
				+'<TD><IMG STYLE=CURSOR:'+mSNs('hand','pointer')+'; onClick=location.href=(\'http://www.webline.dk\') TITLE="Gå til weblines hjemmeside" SRC=images/flogo.gif></TD>'
				+'<TD ALIGN=center>'
					+'<DIV STYLE="FONT-SIZE:32;COLOR:#404040;FONT-WEIGHT:bold;" NOWRAP>COntent MANagement SYstems</DIV>'
					+'<BR><BR><BR>'
					+'<TABLE CELLSPACING=0 ALIGN=center STYLE="WIDTH:200px;BACKGROUND-COLOR:#F2F2F2">'
						+'<TR>'
							+'<TD CLASS=outSet>'+textvar[4]+':</TD>'
							+'<TD CLASS=outSet STYLE="WIDTH:50px" ALIGN=right><INPUT onBlur=check_signs(this) TYPE=text MAXLENGTH=30 STYLE=width:80 NAME=login ID=login class=tekstinput></TD>'
						+'</TR>'
						+'<TR>'
							+'<TD CLASS=outSet>'+textvar[5]+':</TD>'
							+'<TD CLASS=outSet ALIGN=right><INPUT onBlur=check_signs(this) TYPE=password MAXLENGTH=30 STYLE=width:80 NAME=pw ID=pw class=tekstinput></TD>'
						+'</TR>'
						+'<TR><TD CLASS=outSet ALIGN=right COLSPAN=2><INPUT TYPE=submit  TYPE=button NAME=aa ID=aa VALUE="'+textvar[2]+'"></TD></TR>'
					+'</TABLE><BR>'
					+'<TABLE onClick=jSwap(this) CELLSPACING=0 STYLE=WIDTH:200px;CURSOR:'+mSNs('hand','pointer')+'><TR><TD>'+textvar[272]+'?</TD></TR></TABLE>'
					+'<TABLE ID=swapTbl CELLSPACING=0 ALIGN=center STYLE="WIDTH:200px;BACKGROUND-COLOR:#F2F2F2;DISPLAY:none">'
						+'<TR><TD CLASS=outSet>'+textvar[272]+'?</TD><TD><INPUT onBlur=isEmail(this) onFocus=jLgI(this) VALUE=E-mail STYLE=width:80;COLOR:#BABABA TYPE=text NAME=forgetCodes ID=forgetCodes class=tekstinput></TD></TR>'
						+'<TR><TD CLASS=outSet ALIGN=right COLSPAN=2><INPUT onClick=sendForget() TYPE=button TYPE=button NAME=ere ID=ere VALUE="'+textvar[86]+'"></TD></TR>'
					+'</TABLE>'
				+'</TD>'
				+'<TD WIDTH=90>&nbsp;</TD>'
			+'</TR>'
		+'</TABLE>'
		+'<INPUT TYPE=hidden NAME=uplAdmLogin>'
		+'</FORM>')	
};
function sendForget(){
	V=BCk('forgetCodes').value;
	if(V&&!ckEml(V)){
		BCk('swapTbl').style.display=('none');
		makeHttpRequest('cmAdmMisc.asp?cmAdmMisc=forgetCodes&forgetCodes='+V,'sendForget2',false)
	}
};
function sendForget2(TXT){
	if(TXT=='Yes'){alert(textvar[397])}
	else{alert(textvar[396])}
}
