/* Javascript Function For Pop-Up Window containing Find A Store */

function showPopup(url,width,height,mytitle) {
	
	if(!width) { var width = 670; }
	if(!height) { var height = 600; }
	var mytitle = 'Knauf';
	
	if (parseInt(navigator.appVersion)>3) {
 		if (navigator.appName=="Netscape") {
  		winW = window.innerWidth;
  		winH = window.innerHeight;
 		}
 		if (navigator.appName.indexOf("Microsoft")!=-1) {
  		winW = document.body.offsetWidth;
  		winH = document.body.offsetHeight;
 		}
	}
	
	var positionTop = (winH / 2) - (height / 2);
	var positionLeft = (winW / 2) - (width / 2);

	newwindow=window.open(url,'findastore','height='+ height +',width='+ width +',top='+ positionTop + ',left='+ positionLeft + ',resizable');
	newwindow.document.title=''+mytitle+'';
	if (window.focus) {newwindow.focus()}
}
