//#@@########################@@@@@@@@@@@@@@@@@#############################
//#																																				#
//# @ NITRO																																#
//# @ --------------														 													#
//#																																				#
//# @ Autor: Ronald Vilbrandt <info@nitropowered.de>													#
//# @ Website: http://www.nitropowered.de																	#
//# @ Copyright: 2005-2006, Ronald Vilbrandt																		#
//#																																				#
//###########################@@@@@@@@@@@@@@@@@##########################@@#

// PopUp
function popup(FileName, jwidth, jheight, title)
	{
	var title, settings, swidth, sheight, fenster, jwidth, jheight;
	
	// stellt die Bildschirmabmessungen fest
	// find window size
	var ns6 = (!document.all && document.getElementById);
	var ie4 = (document.all);
	var ns4 = (document.layers);
	
	if(ns6 || ns4) {
		swidth = innerWidth;
		sheight = innerHeight;
		}
	else {
		swidth = document.body.clientWidth;
		sheight = document.body.clientHeight;
		}
		
	x = (swidth - jwidth) / 2;
	y = (sheight - jheight) / 2;

	settings = "left = " + x +", top = " + y + ", screenX = " + x + ", screenY = " + y + ", width = " + jwidth + ", height = " + jheight + ", menubar = no, toolbar = no";

	fenster = window.open("", "", settings);
	fenster.focus();
	fenster.document.open();
	with (fenster) {
		document.write("<html><head>");
		document.write('<scr' + 'ipt type="text/javascr' + 'ipt" language="JavaScr' + 'ipt">');
		// Close on Click :)
		document.write("function click() { window.close(); } ");
		document.write("document.onclick=click ");
		document.write('</scr' + 'ipt>');
		document.write("<title>"+ title +"</title></head>");
		document.write("<" + "body ");
		document.write("marginwidth='0' marginheight='0' leftmargin='0' topmargin='0'>");
		document.write("<center>");
		document.write("<img src='"+ FileName +"' border='0' alt='Klicken zum Schließen!'>");
		document.write("<center>");
		document.write("</body></html>");
		
		fenster.document.close();
		}
	}
	

// Der allseits beliebte "Aufklapp-Effekt"
function swap(span) {
	displayType = (document.getElementById(span).style.display == "none" ) ? "block" : "none";
	document.getElementById(span).style.display = displayType;
	}

// Thumbnailvorschau
function previewThumb(pictureUrl) {
	if(pictureUrl == "" || pictureUrl == -1 || pictureUrl == 0)
		document.getElementById("ThumbPicture").src = "gfx/no-photo.jpg";
	else
		document.getElementById("ThumbPicture").src = pictureUrl;
	}
	

// TempDel Confirmation
function confirmDelete(TempId) {
	var check = confirm("Willst Du das Bild wirklich löschen?", "Bild l&ouml;schen...");
  if(check == true)
  	location.href = "index.php?section=pictures&action=delTemp&TempId=" + TempId;	
	}
	
// Formular auf Ziffern überprüfen
function checkNumeric() {
	
	}
	
function confirmReset() {
	var agree = confirm("Sollen die Formulardaten wirklich zurückgesetzt werden?");
	if (agree == true)
		return true;
	else
		return false;
	}	