// mazda NGW general javascript

// generic popup window allowing size to be set
function openWindow (url, winName, w, h, properties) { 
    properties = properties || "resizable"
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+','+ properties;
	newWindow = window.open(url,winName,settings);
	if(url.indexOf("://") == -1) newWindow.focus();
	top.newWindow = true;
	return false;
}

// full screen popup window
function launchFullScreen(url, winName, properties) {
	properties = properties || "resizable"
	LeftPostion = 0;
	TopPosition = 0;
	settings = properties;
	newWindow = window.open(url,winName,settings);
	newWindow.moveTo(0,0);
	newWindow.resizeTo(screen.availWidth,screen.availHeight);
	newWindow.focus();
}	

	function ShowGalImg(name,id,w,h){
		w=w+20;
		h=h+50;
		open('/popup.php?name='+name+'&id='+id, '','resizable=no,scrollbars=no,left=0,top=0,width='+w+',height='+h);
	}
