

	/* POL.js
	 * javascript functions for Panasonic On Line www.panasonic.com
	 * created 010503 btpnyc.com
	 * 
	 */
	 
	 /* CONFIG VARIABLES & "CONSTANTS" */
	 VIRTUAL_IMAGE_DIR = "/images/";

	all_coll = (document.all) ? true : false;
	lyr_coll = (document.layers) ? true : false;

		
	function swap() {
		/*
		 * pass any # pairs DOM-IMG-ID, JS-IMG-OBJ-NAME to swap 
		 * call from <IMG NAME='nav_get'> with
		 * onmouseover="swap('nav_get','nav_get_on')"
		 * onmouseout="swap('nav_get','nav_get_off')"
		 * (i still call from enclosing <A> for nn4 + others)
		 */		
		argv = swap.arguments;
		argc = argv.length;		
		if (enabled && argc % 2 == 0) {
			// argc%2 check verifies even # arguments..
			for (var i = 0; i < argc; i = i + 2) {
				document.images[argv[i]].src = eval(argv[i + 1] + ".src");
			}
		}
		else return false;
	}
		

	function popup(path,title,winwidth,winheight) {
			
		windowoptions = "width=" + winwidth;
		windowoptions += ",height=" + winheight;
		windowoptions += ",dependent=yes";
		windowoptions += ",directories=no";
		windowoptions += ",location=no";
		windowoptions += ",menubar=no";
		windowoptions += ",personalbar=no";
		windowoptions += ",resizable=no";
		windowoptions += ",scrollbars=no";
		windowoptions += ",status=no";
		windowoptions += ",titlebar=no";
		windowoptions += ",toolbar=no";
		
		window.open(path,title,windowoptions);
	}
	
	function closePopup() {
		// link to with <a href="#" onclick="closePopup()"></a>
		self.close();
	}
	
	function printPage() {
		// link to with <a href="#" onclick="printPage()"></a>
		if (window.print) {
			agree = confirm('OK to print now?');
			if (agree) window.print(); 
		}
	}
	
	function write_date() {
		var days 	= new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
		var months 	= new Array('January','February','March','April','May','June','July','August','September','October','November','December');
		var time 	= new Date();
		var day 	= time.getDay();
		var month 	= time.getMonth();
		var date 	= time.getDate();
		if (window.RegExp) { var year 	= time.getFullYear(); }		// js1.3 -- testing time.getFullYear returns error in 1.2
		document.open();
		document.write(days[day] + ", " + months[month] + " " + date + ", " + year);
		document.close();
	}


	function writespacergif() {
	// used by all P.O.L pages except BPS (doesn't expand) + "how to buy" (different size) (home/our company/customer support)
		// js1.2 req
		// for use to right of content
		var imgheight, imgwidth
		//	 alertscreenproperties();
		
		if (all_coll) {
			if (document.body.clientWidth > 780) 	{ imgwidth = document.body.clientWidth - 779;	}
		}
		else {
			 if (window.innerWidth  > 780) 	{ imgwidth  = window.innerWidth  - 779;	}
		}		
		
		if (isNaN(imgheight)) 			{ imgheight = 1; }
		if (isNaN(imgwidth)) 			{ imgwidth= 1; }	
		var imgtagstr = "<img src='/images/trans.gif' height='" + imgheight + "' width='" + imgwidth + "' border='0'>";
		//	alert(imgtagstr);
		document.open();
		document.write(imgtagstr);
		document.close();
	}

	function writespacergifvert() {
	// used by all P.O.L pages except BPS (doesn't expand) + "how to buy" (different size) (home/our company/customer support)
		// js1.2 req
		// for use below copyprotect-privacy stmt
		var imgheight, imgwidth
		//	 alertscreenproperties();
		
		if (all_coll) {
			if (document.body.clientWidth > 780) 	{ imgwidth = document.body.clientWidth - 779;	}
			if (document.body.clientHeight > 410) 	{ imgheight = document.body.clientHeight - 409;	}
		}
		else {
			 if (window.innerWidth  > 780) 	{ imgwidth  = window.innerWidth  - 779;	}
			 if (window.innerHeight > 400) 	{ imgheight = window.innerHeight - 389;	}
		}		
		
		if (isNaN(imgheight)) 			{ imgheight = 1; }
		if (isNaN(imgwidth)) 			{ imgwidth= 1; }	
		var imgtagstr = "<img src='/images/trans.gif' height='" + imgheight + "' width='" + imgwidth + "' border='0'>";
		//	alert(imgtagstr);
		document.open();
		document.write(imgtagstr);
		document.close();
	}

	function writespacergifnovert() {
	// ONLY difference from  writespacergifvert is that no height is added
	// pages with little chance of not reaching the bottom only need the width enforced
		// js1.2 req
		// for use below copyprotect-privacy stmt
		var imgheight, imgwidth
		//	 alertscreenproperties();
		
		if (all_coll) {
			if (document.body.clientWidth > 780) 	{ imgwidth = document.body.clientWidth - 779;	}
		//	if (document.body.clientHeight > 410) 	{ imgheight = document.body.clientHeight - 409;	}
		}
		else {
			 if (window.innerWidth  > 780) 	{ imgwidth  = window.innerWidth  - 779;	}
		//	 if (window.innerHeight > 400) 	{ imgheight = window.innerHeight - 389;	}
		}		
		
		if (isNaN(imgheight)) 			{ imgheight = 1; }
		if (isNaN(imgwidth)) 			{ imgwidth= 1; }	
		var imgtagstr = "<img src='/images/trans.gif' height='" + imgheight + "' width='" + imgwidth + "' border='0'>";
		//	alert(imgtagstr);
		document.open();
		document.write(imgtagstr);
		document.close();
	}
	
	function writespacergifvert_htb() {
	// used by "how to buy" page
		// js1.2 req
		// for use below copyprotect-privacy stmt
		var imgheight, imgwidth
		//	 alertscreenproperties();
		
		if (all_coll) {
			if (document.body.clientWidth > 780) 	{ imgwidth = document.body.clientWidth - 779;	}
			if (document.body.clientHeight > 400) 	{ imgheight = document.body.clientHeight - 399;	}
		}
		else {
			 if (window.innerWidth  > 780) 	{ imgwidth  = window.innerWidth  - 779;	}
			 if (window.innerHeight > 400) 	{ imgheight = window.innerHeight - 399;	}
		}		
		
		if (isNaN(imgheight)) 			{ imgheight = 1; }
		if (isNaN(imgwidth)) 			{ imgwidth= 1; }	
		var imgtagstr = "<img src='/images/trans.gif' height='" + imgheight + "' width='" + imgwidth + "' border='0'>";
		//	alert(imgtagstr);
		document.open();
		document.write(imgtagstr);
		document.close();
	}


	function writespacergif2() {
	// used by many our company/customer support pages, which are a little narrower than some of the others
		// js1.2 req
		// for use below copyprotect-privacy stmt
		var imgheight, imgwidth
		//	 alertscreenproperties();
		
		if (all_coll) {
			if (document.body.clientWidth > 765) 	{ imgwidth = document.body.clientWidth - 765;	}
		}
		else {
			 if (window.innerWidth  > 765) 	{ imgwidth  = window.innerWidth  - 765;	}
		}		
		
		if (isNaN(imgheight)) 			{ imgheight = 1; }
		if (isNaN(imgwidth)) 			{ imgwidth= 1; }	
		var imgtagstr = "<img src='/images/trans.gif' height='" + imgheight + "' width='" + imgwidth + "' border='0'>";
		//	alert(imgtagstr);
		document.open();
		document.write(imgtagstr);
		document.close();
	}


	// ========================================= ACROBAT FUNCTIONS ============================
	var adobeAcrobat = false;
	
	function pdfWin(pdfURL) {
		bName = navigator.appName;
		bVersion = parseInt(navigator.appVersion);
		if (bName == "Netscape" && bVersion >= 3) surfer = "net";
			else surfer = "ie";
		if (surfer == "net") {
			testFORacrobat();
			if (adobeAcrobat == true) {
				window.open(pdfURL, "PDF", "menubar=yes,toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,resizable=yes,width=640,height=400");
			}
			else location = pdfURL;
		}
		else location = pdfURL;
	}
		
	function testFORacrobat() {
		for (i = 0; i < navigator.plugins.length; i++) {
			if (navigator.plugins[i].name == "Adobe Acrobat") {
				adobeAcrobat = true;
			}
			if (navigator.plugins[i].name == "PDFViewer") {
				adobeAcrobat = true;
			}
		}
	}
	
	/* --------------------------------------------------------------------------------------------
	 * resize code from gary smith menu code available @
	 * developer.netscape.com, to force nn4 to reload js/css 
	 * positioned content -- ie5 seems to ignore altogether
	 * --------------------------------------------------------------------------------------------
	 */
	window.onresize = resize;
	window.saveInnerWidth = window.innerWidth;
	window.saveInnerHeight = window.innerHeight;
	
	function resize() {
	    if (saveInnerWidth < window.innerWidth || 
	        saveInnerWidth > window.innerWidth || 
	        saveInnerHeight > window.innerHeight || 
	        saveInnerHeight < window.innerHeight ) 
	    {
	        window.location.reload();
	    }
	}	
	
	//   = = = = = = = = = = = = = = =  d e b u g   f u n c t i o n s   = = = = = = = = = = = = = = =
	
	function alertscreenproperties() {
		var screenprop;
		screenprop = "SCREEN PROPERTIES\n" +
		"-----------------\n" +
		"availWidth: " + screen.availWidth + "\n" + 
		"availHeight: " + screen.availHeight + "\n" + 
		"width: " + screen.width + "\n" + 
		"height: " + screen.height + "\n";
		if (all_coll) {
			screenprop += "-------------------\n" +
			"DOCUMENT.body PROPERTIES\n" +
			"-------------------\n" +
			".clientWidth: " + document.body.clientWidth  + "\n" +	
			".clientHeight: " + document.body.clientHeight + "\n" 
		}
		else {
			screenprop += "-------------------\n" +
			"DOCUMENT PROPERTIES\n" +
			"-------------------\n" +
			"width: " + document.width  + "\n" +			// nn1.2
			"height: " + document.height + "\n" +			// nn1.2
			"-------------------\n" +
			"WINDOW PROPERTIES\n" +
			"-------------------\n" +
			"innerWidth: " + window.innerWidth  + "\n" +	// nn1.2
			"innerHeight: " + window.innerHeight + "\n"  +	// nn1.2
			"outerWidth: " + window.outerWidth  + "\n" +	// nn1.2
			"outerHeight: " + window.outerHeight + "\n" 	// nn1.2
		}
		alert(screenprop);
	}
		
	/*  screen object properties	
	
  availHeight
              Specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed
              by the operating system, such as the Taskbar on Windows.
  availLeft
              Specifies the x-coordinate of the first pixel that is not allocated to permanent or semipermanent user interface
              features.
  availTop
              Specifies the y-coordinate of the first pixel that is not allocated to permanent or semipermanent user interface
              features.
  availWidth
              Specifies the width of the screen, in pixels, minus permanent or semipermanent user interface features displayed
              by the operating system, such as the Taskbar on Windows.
  colorDepth
              The bit depth of the color palette, if one is in use; otherwise, the value is derived from screen.pixelDepth.
  height
              Display screen height.
  pixelDepth
              Display screen color resolution (bits per pixel). 
  width
              Display screen width.	
	*/
	