﻿// JScript File
function openWindow(URL){

	var w, h;

	w = 640;
	h = 510;

	var isMac = (navigator.appVersion.indexOf("Mac") != -1);
	var isNetscape = (!(navigator.appName.indexOf("Microsoft") != -1));
	var isVersion7 = (navigator.userAgent.indexOf("Netscape/7") != -1);

	if (isMac)
		BookURL += "&IsMac=1";
	if (isNetscape)
		BookURL += "&IsNetscape=1";
	if (isVersion7)
		BookURL += "&BrowserVersion=7";
	if ((!isMac) && (isNetscape) && (isVersion7))
		h -= 50;
	if ((isMac) && (isNetscape))
		h -= 55;

	var iwindowHand = window.open(URL, "document", "fullscreen=no,resizable=yes,status=yes,toolbar=no,menubar=no,location=no,width="+w+",height="+h+",top=0,left=0");
	
	if (iwindowHand == null || typeof(iwindowHand)=="undefined")	
	    alert ("Please disable your popup blocker");
	else {
	    iwindowHand.focus();
	}
	
	return iwindowHand
    
} 

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}

function printField(Content) {      
   pWin = openWindow();
   pWin.document.open();
   pWin.document.write('<html><head></head><body>');
   pWin.document.write(Content);
   pWin.document.write('</body></html>');
   pWin.print();
   pWin.document.close();
   pWin.close();
}
