//////////////////////////////////////////////////////
//													//
//					JS-Functions					//
//													//
//////////////////////////////////////////////////////


/////////////////////////////////////////////////////
//	Resize handler to prevent the Netscape Resize-Bug
/////////////////////////////////////////////////////
if(document.ids)window.onLoad=function(){
	var origWidth=innerWidth;
	var origHeight=innerHeight;
	function initResize(){onResize=
	function(){
	if((innerWidth!=origWidth)||
		(innerHeight!=origHeight))
		self.location.href=location.href;}}
	initResize();}

/////////////////////////////////////////////////////
// Confirm on submit
/////////////////////////////////////////////////////
function confirmSubmit(frmObj){
	if (confirm("Sind Sie sicher, daß Sie diesen Eintrag speichern wollen?")) return true; 
 	else return false; 
}
/////////////////////////////////////////////////////
// Confirm on delete
/////////////////////////////////////////////////////
function confirmDelete(){
	if (confirm("Sind Sie sicher, daß Sie diesen Eintrag löschen wollen?")) return true; 
 	else return false; 
}
/////////////////////////////////////////////////////
// PopUp opener
/////////////////////////////////////////////////////
function popup(url) {
	fenster = window.open(url, "newwindow", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=1024, height=768, left=60, top=60"); 
	fenster.focus();
}

/////////////////////////////////////////////////////
// Help window opener
/////////////////////////////////////////////////////
function infoboard(url) {
	fenster = window.open(url, "newwindow", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, width=480, height=320, left=60, top=60"); 
	fenster.focus();
}

/////////////////////////////////////////////////////
// Image preview opener
/////////////////////////////////////////////////////
function imagepreview(url) {
	fenster = window.open(url, "newwindow", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, width=640, height=480, left=60, top=60"); 
	fenster.focus();
}

/////////////////////////////////////////////////////
// Image opener
/////////////////////////////////////////////////////
function pic(name, width, height)
{
	var hackbild = new Image();
	hackbild . src = "upload/Image/" + name + "";

	width = width + 38;
	height = height + 48;

	bildfenster = window . open(''+ hackbild . src +'', 'Bild', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=no,width='+ width +', height='+ height +'');

	if (navigator . appName == "Netscape") {
		bildfenster . outerHeight = height;
		bildfenster . outerWidth = width;
	} else {
		bildfenster . resizeTo(width + 38, height + 40);
	} 
	bildfenster . focus();
} 
/////////////////////////////////////////////////////
// Panorama opener
/////////////////////////////////////////////////////
function panorama(name, width, height)
{
	width = width + 38;
	height = height + 48;

	bildfenster = window . open('' + name + '', 'Panorama', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=no,copyhistory=no,scrollbars=yes,width=' + width + ', height=' + height + '');

	if (navigator . appName == "Netscape") {
		bildfenster . outerHeight = height;
		bildfenster . outerWidth = width;
	} else {
		bildfenster . resizeTo(width + 38, height + 40);
	} 
	bildfenster . focus();
} 
/////////////////////////////////////////////////////
// Layer management
/////////////////////////////////////////////////////

function hidelayer () {
	document.getElementById("inputlayer1").style.display="none";
}
function showlayer () {
	document.getElementById("inputlayer1").style.display="block";
}

