// # Version: $RCSfile: popup.js,v $$Revision: 1.12 $$Date: 2010/02/03 14:23:33 $

function popup(url, type) {
	
	
	var width=400;
	var height=400;
	
	type=type.toLowerCase(); 
	
	if(type=='warenkorb') {
		width=500;
		height=400;
	}
	
	if(type=='produkt') {
		width=600;
		height=500;
	}
	
	if(type=='produktzoom') {
		width=570;
		height=380;
	}
	
	if(type=='kundennummer') {
		width=300;
		height=150;
	}
	
	if(type=='agb') {
		width=800;
		height=600;
	}
	
	if(type=='printpopup') {
		width=665;
		height=600;
	}
	
	if(type=='fullsize') {
		width=screen.availWidth;
		height=screen.availHeight;
	}
	
	if(type=='english') {
		width=590;
		height=480;
	}
	
	if(type=='mehrwertsteuer') {
		width=350;
		height=220;
	}

	if(type=='versand') {
		width=590;
		height=480;
	}
	
	if(type=='faxbestellung') {
		width=660;
		height=580;
	}
	
	
	var left=((screen.availWidth-width)/2);
	var top=((screen.availHeight-height)/2);
	
	newpopup = window.open(url, type, 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+width+',height='+height+',top='+top+',left='+left);
	newpopup.focus();
	
	return true;
}
