//
// Definition of a function to open easyBook
//											 Kz2007-09-03
//

function viewer(openUrl,dw,dh,wStyle)  {

	var plat = navigator.platform;
	var BName = navigator.appVersion;

	var sw = (screen.availWidth - dw) /2;
	var sh = (screen.availHeight - dh) /2; 	
	var real_sw=  screen.width;
	var real_sh = screen.height; 

	//Adjustment of window start position (left side)  		For Internet Explorer Macintosh
	if (plat == "MacPPC") {
		if (sw == 0 && (BName.search("MSIE")>=0) ) {
			sw = sw + 12;
		}
	} 

	//Adjustment of window start position (upper side)
	if (plat == "MacPPC") {
		if (real_sh<=768) {	
			if (sh > 40) {
				sh = sh -5;
			}
		} else {
			if (sh > 40 ) {
				sh = sh - 15;
			}
		} 
	} else {
		if (real_sh<=768) {
			sh = sh - 10;
		} else {
			sh = sh -35;
		} 
		if (sh < 0) {
			sh = 0;
		}
	}

	window.open(openUrl, "easyBook", "top="+ sh + ",left=" + sw + ",width=" + dw + ", height=" + dh + ", fullscreen=" + wStyle);
}

