//******************************************************************************************************//
//
//   allgemeine JavaScripte Fritz Klein ©
//
//******************************************************************************************************//


var impressum_obj;
function openImpressum() {
	if(!impressum_obj || impressum_obj.closed){
		var url_frs 	= "impressum.php";
		var name 		= "impressum_schuker";
		var w 			= 470;
		var h 			= 350;
		var l 			= 100;
		var t 			= 50;

		impressum_obj = eval('window.open("' + url_frs + '", "' + name + '", "width=' + w + ',height=' + h + ',status=no,resizable=no,left=' + l + ',top=' + t + '");');
	}
	impressum_obj.focus();
}

var kontakt_obj;
function openKontakt() {
	return false;
	if(!kontakt_obj || kontakt_obj.closed){
		var url_frs 	= "kontakt.php";
		var name 		= "kontakt_schuker";
		var w 			= 470;
		var h 			= 500;
		var l 			= 100;
		var t 			= 50;

		kontakt_obj = eval('window.open("' + url_frs + '", "' + name + '", "width=' + w + ',height=' + h + ',status=no,resizable=no,scrollbars=yes,left=' + l + ',top=' + t + '");');
	}
	kontakt_obj.focus();
}

var bestellung_obj;
function openBestellung() {
	if(!bestellung_obj || bestellung_obj.closed){
		var url_frs 	= "bestellung.php";
		var name 		= "bestellung_schuker";
		var w 			= 520;
		var h 			= 600;
		var l 			= 100;
		var t 			= 50;

		bestellung_obj = eval('window.open("' + url_frs + '", "' + name + '", "width=' + w + ',height=' + h + ',status=no,resizable=no,left=' + l + ',top=' + t + '");');
	}
	bestellung_obj.focus();
}

var pdf_obj;
function openPDF( pdf_name ) {
	if(!pdf_obj || pdf_obj.closed){
		var url_frs 	= "./pdf/" + pdf_name + ".pdf";
		var name 		= "bestellung_schuker";
		var w 			= 650;
		var h 			= 750;
		var l 			= 100;
		var t 			= 50;

		pdf_obj = eval('window.open("' + url_frs + '", "' + name + '", "width=' + w + ',height=' + h + ',status=no,resizable=yes,left=' + l + ',top=' + t + '");');
	}
	pdf_obj.focus();
}

var img_obj;
//var img_obj.img_url='';
function openBild( img_url, w, h ) {

	//alert(img_obj.img_url);
	//if(img_obj.img_url != img_url || img_obj.closed){
	var url_frs 	= 'img_popup.php?img_url=' +img_url +'&w=' +w +'&h=' +h;
	var name 		= "bilder_schuker";
	/*var w 			= 650;
	var h 			= 750;*/
	var l 			= 100;
	var t 			= 50;
	img_obj = eval('window.open("' + url_frs + '", "' + name + '", "width=' + w + ',height=' + h + ',status=no,resizable=no,left=' + l + ',top=' + t + '");');
	//img_obj.img_url = img_url;
	//alert(img_obj.img_url);

	//}
	img_obj.focus();
}

function closeMe() {
	top.window.close();
	return false;
}




function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
		else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function unipopup(url,name,w,h,options) {
	width	= 600; if(w){ width = w; };
	height	= 420; if(h){ height = h; };
	wname = "POPUP";if(name){ wname = name; };
	options = "toolbar=no,scrollbars=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,resizable=no,width="+width+",height="+height+","+options;

	unipop	= window.open(url,wname,options);
	if(document.all) {
		x = (screen.availWidth - width) / 2
		y = (screen.availHeight - height) / 2
		if(x < 1) { x = 1}; if(y < 1) { y = 1};
		unipop.moveTo(x,y)
	}
	unipop.focus();
}
