var myPictureMarker;
var global_test;

// JavaScript Document
function getTopElement(objID) {
	if (document.all) {
		objElement = eval('top.' + objID);
		return objElement; 
	}
	if (document.getElementById) {
		objElement = top.document.getElementById(objID);
		return objElement;
	}

}

function display_direct_edit(myelement,key,myvalue,sprachrealm,myform){
	var deditheight=240;
	var buffer=0;
	mynewtop=(myelement.offsetTop-deditheight-buffer-window.pageYOffset);
	mynewleft=0;
	if(mynewtop<0){
		mynewleft=mynewtop*-1;
		mynewtop=0;
	}
	document.getElementById('dedit').style.display="block";
	document.getElementById('dedit').style.height=deditheight+"px";
	document.getElementById('dedit').style.position="fixed";
	document.getElementById('dedit').style.top=mynewtop+"px";
	document.getElementById('dedit').style.left=(myelement.offsetLeft)+mynewleft+"px";
	document.getElementById('dedit').innerHTML="<div style='margin-left:5px;margin-top:5px;height:20px; width:290px; overflow:hidden;'>label:[<span style='font-size:12px; font-weight:bold; color:#FF0FFF;'> "+key+"</span>]</div><div style='margin-left:5px;margin-top:5px;height:20px; width:290px;'>Language:[<span style='font-size:12px; font-weight:bold; color:#FF0FFF;'> "+sprachrealm+"</span>]</div>"+myform;
	
}

function hide_direct_edit(){
	document.getElementById('dedit').style.display=none;
}


function evalKeyForSubmit(event) {
	//alert(event);
	if (event && (event.which == 13 || event.keyCode==13)) { // IE: ...event.keyCode...
	// ENTER gedrckt, also Formular abschicken
		return false;	
	}else{
		return true;
	}
}


function FensterOeffnen (Adresse) {
  Fenster1 = window.open(Adresse, "Zweitfenster", "width=417,height=700,left=300,top=300,resizable=no");
  Fenster1.focus();
}


function FensterOeffnen2 (Adresse) {
  Fenster1 = window.open(Adresse, "Zweitfenster", "width=437,height=700,left=300,top=300,resizable=no,scrollbars=yes");
  Fenster1.focus();
}

function FensterOeffnenX (Adresse,myHeight) {
  Fenster1 = window.open(Adresse, "Zweitfenster", "width=437,height="+myHeight+",left=300,top=300,resizable=no,scrollbars=yes");
  Fenster1.focus();
}

function FensterOeffnenY (Adresse,myWidth) {
  Fenster1 = window.open(Adresse, "Zweitfenster", "width="+myWidth+",height=700,left=300,top=300,resizable=no,scrollbars=yes");
  Fenster1.focus();
}

function FensterOeffnenXY (Adresse,myWidth,myHeight) {
  Fenster1 = window.open(Adresse, "Zweitfenster", "width="+myWidth+",height="+myHeight+",left=300,top=300,resizable=no,scrollbars=yes");
  Fenster1.focus();
}

function FensterOeffnenAll (address,width,height,menubar,toolbar,locationbar,personalbar,statusbar,scrollbar) {
  Fenster1 = window.open(address, "Zweitfenster", "width="+width+",height="+height+",left=200,top=200,resizable=no,scrollbars="+scrollbar+",menubar="+menubar+",toolbar="+toolbar+",locationbar="+locationbar+",personalbar="+personalbar+",statusbar="+statusbar+"");
  Fenster1.focus();
}

function machzu(){
	window.close();
}

function resize_ultimate_div(){
	document.getElementById("ultimate_overlay").style["height"] =document.getElementById("content_main").clientHeight+"px";
	document.getElementById("ultimate_overlay").style["top"] =document.getElementById("content_main").offsetTop+"px";
	document.getElementById("real_ultimate_overlay").style["height"] =document.getElementById("content_main").clientHeight+"px";
	document.getElementById("real_ultimate_overlay").style["top"] =document.getElementById("content_main").offsetTop+"px";
	if(document.all){
		var zipfi=135+3;
		if(document.getElementById("view_add_pos0")){
			zipfi=zipfi+document.getElementById("view_add_pos0").clientHeight;
			
		}
		document.getElementById("ultimate_overlay").style["top"] =zipfi+"px";
		document.getElementById("real_ultimate_overlay").style["top"] =zipfi+"px";
	}
	
	document.getElementById("real_ultimate_overlay").style["visibility"] ="visible";
}

function resize_ultimate_div2(){
	document.getElementById("ultimate_overlay2").style["height"] =document.getElementById("content_main").clientHeight+"px";
	document.getElementById("ultimate_overlay2").style["top"] =document.getElementById("content_main").offsetTop+"px";
	document.getElementById("real_ultimate_overlay2").style["height"] =document.getElementById("content_main").clientHeight+"px";
	document.getElementById("real_ultimate_overlay2").style["top"] =document.getElementById("content_main").offsetTop+"px";
	if(document.all){
		var zipfi=135+3;
		if(document.getElementById("view_add_pos0")){
			zipfi=zipfi+document.getElementById("view_add_pos0").clientHeight;
			
		}
		document.getElementById("ultimate_overlay2").style["top"] =zipfi+"px";
		document.getElementById("real_ultimate_overlay2").style["top"] =zipfi+"px";
	}
	
	document.getElementById("real_ultimate_overlay2").style["visibility"] ="visible";
}

