var isPraCode
var sendActive=0

function setEdit(type,m_editX,m_editY){
	isPraCode=0
	reText=""
	reText+=drawDivPic("editBut",m_editX,m_editY,32,32,"",'','',1,'','','',1,'onClick="goEdit()" onmouseover="activateSend(1)" onmouseout="activateSend(0)"','','content/bilder/trans.gif','')
	vis=["visibility: hidden",""]
	
	if(type==0){x=m_editX+20}else{x=m_editX-108}
	reText+='<form name="formCode" method="post"  enctype="multipart/form-data">'
	reText+=drawDiv("keyWord",x,m_editY,100,16,"",'','',1,"","","",0,"",vis[isPraCode])
		reText+='<input type="password" name="pass" id="pass" class="normTextBold" style="font-family: Small Fonts; font-size: 6pt; font-weight: bold; width: 100px; height: 14px; border: 1px solid #000000; background-color: #ffffff; color: #000000; " maxlength="16" onkeyup="editTestKey(window.event)" onblur="closeEdit()">'
	reText+='</div>'
	reText+='</form>'
	return reText
}

function activateSend(index){sendActive=index}

function closeEdit(){document.getElementById('keyWord').style.visibility="hidden";isPraCode=sendActive}

function goEdit(){
	if(isPraCode==0){
		document.getElementById('keyWord').style.visibility="visible"
		isPraCode=1
		document.getElementById('pass').focus()
	}
	else{
		if(document.getElementById('pass').value==""){
			document.getElementById('pass').value=""
			isPraCode=0
			document.getElementById('keyWord').style.visibility="hidden"
		}
		else{
			document.formCode.action="index.php?site=" + isSite  // + "&look=" + begriff
			document.formCode.submit()		
			document.getElementById('pass').value=""
			document.getElementById('keyWord').style.visibility="hidden"
			isPraCode=0
			return false
		}
	}
}

function editTestKey(ekey){if (ekey.keyCode == 13){goEdit()}}

