/* 	newPopWindowA added by Dave R 11-20-03 for Nancy so that they could use the same function to
	create pop windows with different names and set the window options.  This function
	also alows the pop up to be positioned on the screen. 
	
	** This does not work in version 3 browsers
	
	How To use
	winURL = the location of the page you wish to put in the pop up
	winName = what you want to name the new pop up window
	winWidth = how wide you want your pop up to be
	winHeight = how long your pop window will be
	location = do you want to show the location bar [0 = no, 1 = yes]
	directories = do you want to show the Netscape Directory Buttons [0 = no, 1 = yes]
	status = do you want to display the browsers status bar [0 = no, 1 = yes]
	menubar = do you want to display the browser menu bar [0 = no, 1 = yes]
	scrollbars = do you want this pop up to have scroll bars [0 = no, 1 = yes]
	toolbar = do you want this pop up to have a tool bar [0 = no, 1 = yes]
	resizable = do you want this pop up to be resizable
	dependant = ? not sure but on all of the other functions it is set to 1
	top = Specifies the Y coordinate of the top left corner of the new window [ specified in pixels ]
	left = Specifies the X coordinate of the top left corner or the new window [ specified in pixels ]
	
	example of a link to a pop up with all options on
	<a href="javascript:newPopWindowA('fuelcell.html','pop_1','605','600','1','1','1','1','1','1','1','1','405','400')">launch pop</a>
	
	example of a link to a pop up with all options off
	<a href="javascript:newPopWindowA('fuelcell.html','pop_1','605','600','0','0','0','0','0','0','0','0','405','400')">launch pop</a>
*/


function newPopWindowA(winURL,winName,winWidth,winHeight,location,directories,status,menubar,scrollbars,toolbar,resizable,dependent,top,left) {
	// update dave 12-09-03 dummy=0 was added because the winFeatures string ignores the first argument for some reason
	winFeatures="'dummy=0,width="+winWidth+",height="+winHeight+",top="+top+",left="+left+",screenx="+top+",screeny="+left
	+",location="+location+",directories="+directories
	+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars
	+",toolbar="+toolbar+",resizable="+resizable+",dependent="+dependent+"'";
	//alert('Window Features Are: '+winFeatures+'\nWindow Name = '+winName);
	showWindow=window.open(winURL,winName,winFeatures);
	showWindow.focus();
}// end newPopWindowA


/* 	newPopWindowB added by Dave R 11-20-03 for Nancy so that they could use the same function to
	create pop windows with different names and set the window options.
	
	How To use
	winURL = the location of the page you wish to put in the pop up
	winName = what you want to name the new pop up window
	winWidth = how wide you want your pop up to be
	winHeight = how long your pop window will be
	location = do you want to show the location bar [0 = no, 1 = yes]
	directories = do you want to show the Netscape Directory Buttons [0 = no, 1 = yes]
	status = do you want to display the browsers status bar [0 = no, 1 = yes]
	menubar = do you want to display the browser menu bar [0 = no, 1 = yes]
	scrollbars = do you want this pop up to have scroll bars [0 = no, 1 = yes]
	toolbar = do you want this pop up to have a tool bar [0 = no, 1 = yes]
	resizable = do you want this pop up to be resizable
	dependant = ? not sure but on all of the other functions it is set to 1
	
	example of a link to a pop up with all options on
	<a href="javascript:newPopWindowB('fuelcell.html','pop_1','605','600','1','1','1','1','1','1','1','1')">launch pop</a>
	
	example of a link to a pop up with all options off
	<a href="javascript:newPopWindowB('fuelcell.html','pop_1','605','600','0','0','0','0','0','0','0','0')">launch pop</a>
*/


function newPopWindowB(winURL,winName,winWidth,winHeight,location,directories,status,menubar,scrollbars,toolbar,resizable,dependent) {
	// update dave 12-09-03 dummy=0 was added because the winFeatures string ignores the first argument for some reason
	winFeatures="'dummy=0,location="+location+",directories="+directories
	+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars
	+",toolbar="+toolbar+",resizable="+resizable+",dependent="+dependent
	+",width="+winWidth+",height="+winHeight+"'";
	//alert('Window Features Are: '+winFeatures+'\nWindow Name = '+winName);
	showWindow=window.open(winURL,winName,winFeatures);
	showWindow.focus();
}//end newPopWindowB




/* 	newPopWindowC added by Dave R 11-20-03 for Nancy so that they could use the same function to
	create pop windows with different names and choose from a standard set of window features
	
	How To use
	winURL = the location of the page you wish to put in the pop up
	winName = what you want to name the new pop up window
	winWidth = how wide you want your pop up to be
	winHeight = how long your pop window will be
	winOptions = what options would you like. [ 0 = none, 1= standard, 2 = all ]
	
	*none ------ all winFeatures turned off
	*standard -- scrollbars on, toolbar on, resizable on, dependent on
	*all ------- all winFeatures are on
	
	
	example of a link to a pop up window
	<a href="javascript:newPopWindowc('fuelcell.html','pop_1','605','600',1)">launch pop</a>
	
*/


function newPopWindowC(winURL,winName,winWidth,winHeight,winOptions) {
	switch(winOptions){
		// update dave 12-09-03 dummy=0 was added because the winFeatures string ignores the first argument for some reason
		case 0: winFeatures="'dummy=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,toolbar=0,resizable=0,dependent=0,width="+winWidth+",height="+winHeight+"'";
		break;
		case 1: winFeatures="'dummy=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=1,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
		break;
		case 2: winFeatures="'dummy=0,location=1,directories=1,status=1,menubar=1,scrollbars=1,toolbar=1,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
		break;
	}//end switch
	//alert('Window Features Are: '+winFeatures+'\nWindow Name = '+winName);
	showWindow=window.open(winURL,winName,winFeatures);
	showWindow.focus();
}//end newPopWindowC

function goBack() {
history.back();
}//end goBack

function goAway() {
window.close();
}//end goAway

function changeOpener(winURL) {
window.opener.location.href= winURL;
window.opener.focus();
}//end changeOpener


/************************************     DO NOT USE ANY FUNTCTIONS BELOW THIS LINE ANYMORE    ************************************/
/************************************       THEY ARE ONLY HERE FOR BACKWARDS COMPATABILITY     ************************************/


















function popWindow(winURL,winWidth,winHeight) {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=1,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
showWindow=window.open(winURL,"showWindow",winFeatures);
showWindow.focus();
}

function hintPop(winURL,winWidth,winHeight) {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
hintWindow= window.open(winURL,"hintWindow",winFeatures);
hintWindow.focus();
}



function popWindowAlt(winURL,winWidth,winHeight) {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
showWindow2=window.open(winURL,"showWindow2",winFeatures);
showWindow2.focus();
}

function popCardWindow(winURL,winWidth,winHeight) {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=1,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
cardWindow=window.open(winURL,"showWindow",winFeatures);
cardWindow.focus();
}

function popFuelWindow(winURL,winWidth,winHeight) {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=1,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
fuelWindow=window.open(winURL,"fuelWindow",winFeatures);
fuelWindow.focus();
}

function popCalcWindow(winURL,winWidth,winHeight) {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
calcWindow=window.open(winURL,"calcWindow",winFeatures);
calcWindow.focus();
}

function popMapWindow(winURL,winWidth,winHeight) {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=1,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
showWindow=window.open(winURL,"showWindow",winFeatures);
showWindow.focus();
}

function popD3fullWindow() {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1,dependent=1,width="+screen.width+",height="+screen.height+"'";
d3Window=window.open("d3_swf/index.html","d3Window",winFeatures);
d3Window.focus();
}

function popD3smallWindow() {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1,dependent=1,width=750,height=550'";
d3Window=window.open("d3_swf/index.html","d3Window",winFeatures);
d3Window.focus();
}

function popChartWindow(popURL) {
chartWindow=window.open(popURL,'chartWindow','dependent=yes,toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=775,height=600');
chartWindow.focus();
}

function popparksWindow(winURL) {
winFeatures="'location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1,dependent=1,width=605,height=550'";
showparkWindow=window.open(winURL,"showparkWindow",winFeatures);
showparkWindow.focus();
}

function popairbagWindow(winURL,winWidth,winHeight) {
winFeatures="'screenX=400,screenY=200,location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+",left=400,top=200'";
showairbagWindow=window.open(winURL,"showairbagWindow",winFeatures);
showairbagWindow.focus();
}
function popPlantWindow(winURL,winWidth,winHeight) {
winFeatures="'screenX=100,screenY=200,location=1,directories=0,status=0,menubar=0,scrollbars=1,toolbar=1,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+",left=100,top=100'";
showairbagWindow=window.open(winURL,"showairbagWindow",winFeatures);
showairbagWindow.focus();
}

function popSiteWindow() {
winFeatures="screenX=100,screenY=50,location=1,directories=0,status=0,menubar=1,scrollbars=1,toolbar=0,resizable=1,dependent=0,width=775,height=510,left=100,top=50";
siteWindow=window.open("home.html","siteWindow",winFeatures);
siteWindow.focus();
}



function popWindowName(winURL,winWidth,winHeight,winName)
{

winFeatures="location=0,directories=0,status=0,menubar=0,scrollbars=1,toolbar=1,resizable=1,dependent=1,width="+winWidth+",height="+winHeight+"'";
var thiswin=window.open(winURL,winName,winFeatures);
thiswin.focus();
}


