function doit(PopupUrl) { window.open(PopupUrl, "PopupWindowTRE", "width=800,height=600,scrollbars=yes,resizable=yes,menubar=no,location=no,toolbar=no,status=yes"); 
}

function doit2(url) {
   F = window.open(url);
}

function smallPopUp(PopupUrl) { window.open(PopupUrl, "PopupWindowTRE", "width=600,height=560,scrollbars=yes,resizable=no,menubar=no,location=no,toolbar=no"); 
}

function jump(form) {
 var jumpto;
 var sanz;
 if (document.all["sanz"].checked) {
   sanz=1;
   }
   else {sanz=0;}
 jumpto=form.options[form.selectedIndex].value + "&sanz=" + sanz;
 location = jumpto;
}

function jumpit(form) {
if (form.selectedIndex != 0) {F = window.open(form.options[form.selectedIndex].value,"_self");}
}

function mark(zw) {
  document.getElementById(zw).checked = true;
 }

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
	scroll(0,0);
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}

function isEmpty(elem, helperMsg,value_txt){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		elem.value=value_txt;
		return true;
	}
	return false;
}

function val_foto_datei(element_id,alert_txt,value_txt) {
var a_status;	
	a_status=isEmpty(document.getElementById(element_id),alert_txt,value_txt);
	if (a_status==false) {
	 //toggleBox('demodiv',1);
	 return true;
	} else {
	 return false;
	}
}

function loadUploadProgress() {
 GetRequest2InnerHTML('uploadresult','ax_ufs','index','&page=main','');
 setTimeout("loadUploadProgress()", 3000); //3min
}

function val_upload_click() {
var a_status;
a_status = val_foto_datei('datei_a2','Bitte geben Sie erst ein Foto an. Klicken Sie auf Durchsuchen.','IHR FOTO');
if (a_status==false) {
 return false;
}  else {
 //loadUploadProgress();
 loadLytebox('uploadprogress');
 return true;
}
}

		var timeoutID = 0;
		function loadLytebox(id) {
			if (typeof myLytebox != 'undefined') {
				// if the myLytebox object exists, start it up!
				myLytebox.start(document.getElementById(id), false, true);
			} else {
				// wait 5/10th of a second and attempt loading again...
				if (timeoutID) { clearTimeout(timeoutID); }
				timeoutID = setTimeout('loadLytebox("'+id+'")', 500);
			}
		}

function submitFrameForm(fid_value) {
	for( var i = 0; i < document.inkorb_form.fid_color.length; i++ ){
		
		if( document.inkorb_form.fid_color[i].value == fid_value ){
			document.inkorb_form.fid_color[i].checked = true;
			} else {
				if (document.inkorb_form.fid_color[i].checked==true) document.inkorb_form.fid_color[i].checked = false;
			}
		}
 document.inkorb_form.submit();		
}

function showDivTag(eid){
 document.getElementById(eid).style.display = 'block';
 document.getElementById(eid).style.visibility = 'visible';
 }

function hideDivTag(eid) {
 document.getElementById(eid).style.visibility = 'hidden';
 }