function changeCSS(LinkObject, newCSS) {
   LinkObject.className = newCSS;
}
function setParentName(){
	this.name = "parent";
}
function setChildName(){
	this.name = "child";
}

function insert(what, form_name,textarea_name)
 {
  if (document.forms[form_name].elements[textarea_name].createTextRange)
   {
    document.forms[form_name].elements[textarea_name].focus();
    document.selection.createRange().duplicate().text = what;
   }
  else if ((typeof document.forms[form_name].elements[textarea_name].selectionStart) != 'undefined') // für Mozilla
   {
    var tarea = document.forms[form_name].elements[textarea_name];
    var selEnd = tarea.selectionEnd;
    var txtLen = tarea.value.length;
    var txtbefore = tarea.value.substring(0,selEnd);
    var txtafter =  tarea.value.substring(selEnd, txtLen);
    tarea.value = txtbefore + what + txtafter;
    tarea.selectionStart = txtbefore.length + what.length;
    tarea.selectionEnd = txtbefore.length + what.length;
   }
  else
   {
    document.forms[form_name].elements[textarea_name].value += what;
   }
 }
 
 
function openpopup(site,width,height,scrollbars) {
	popup = window.open(site , "variable", "width=" + width + ",height=" + height + ",scrollbars=" + scrollbars + ",resizable=yes");
	popup.resizeTo(width,height);
	window.popup.focus();
}

// small information-windows
function openinfo(site){
   var popOffsetx = 10-380;  //horizontal
   var popOffsety = -10;   //vertikal
		   
   var x=y=0;
   x=xMousePos+popOffsetx;
   y=yMousePos+popOffsety;
   
   var prop = "screenX="+x+",screenY="+y+",left="+x+",top="+y+", status=no , menubar=no ,resizable=yes, width=450,height=155,scrollbars=yes";
   try{info.close();}catch (e){}
   info = window.open(site,"Information", prop);
   window.info.focus();
}
// resizes window to 
function setinnersize(width, height){
	window.innerWidth = width;
	window.innerHeight = height;
	// window.resizeTo(width,height);
	window.focus();
}

//opens url in parent-window
function openinparent(url){
	opener.location = url;
	return (false);
}

if (document.layers) { // Netscape
    document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = captureMousePosition;
} else if (document.all) { // Internet Explorer
    document.onclick = captureMousePosition;
} else if (document.getElementById) { // Netcsape 6
    document.onclick = captureMousePosition;
}
// Global variables
xMousePos = 0; // Horizontal position of the mouse on the screen
yMousePos = 0; // Vertical position of the mouse on the screen
		
function captureMousePosition(e) {
    if (document.layers) {
		xMousePos = e.screenX;
        yMousePos = e.screenY;
    } else if (document.all) {
		xMousePos = window.event.screenX;
        yMousePos = window.event.screenY;
    } else if (document.getElementById) {
		xMousePos = e.screenX;
        yMousePos = e.screenY;
    }
}





function checkurl(){
	//if(top.location.host!="www.venditio.com") self.location = "http://www.venditio.com"+location.pathname+location.hash;
}

function reset_ee(){
	konto_name=document.forms['persdatachange'].elements['konto_name'].value;
	konto_nr=document.forms['persdatachange'].elements['konto_nr'].value;
	konto_blz=document.forms['persdatachange'].elements['konto_blz'].value;
	konto_bname=document.forms['persdatachange'].elements['konto_bname'].value;

	document.forms['persdatachange'].elements['konto_name'].value = '';
	document.forms['persdatachange'].elements['konto_nr'].value = '';
	document.forms['persdatachange'].elements['konto_blz'].value = '';
	document.forms['persdatachange'].elements['konto_bname'].value = '';
	document.forms['persdatachange'].elements['konto_ee'].checked = false;
}
function set_ee(){
	if(konto_name!='')document.forms['persdatachange'].elements['konto_name'].value = konto_name;
	if(konto_nr!='')document.forms['persdatachange'].elements['konto_nr'].value = konto_nr;
	if(konto_blz!='')document.forms['persdatachange'].elements['konto_blz'].value = konto_blz;
	if(konto_bname!='')document.forms['persdatachange'].elements['konto_bname'].value = konto_bname;
//	document.forms['persdatachange'].elements['konto_ee'].checked = true;
}


