function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

var popupWin ;				// Used ty OpenWin and other pages to detect if a pop-up blocking is on.
var imgPreLoad = false;		// used by change image
var jsTime = "01234567890";
//---------------------------- Begin Window Open Template ---------------------------- //
// Open a pop-up window
function OpenWin()
{
	// Set default values
	var winName = "newWin";
	var intWd = 500;
	var intHt = 500;
	var intXPos = -1;
	var intYpos = -1;

	var bTool = 'yes';
	var	bLoc = 'yes';
	var bStatus = 'yes';
	var bMenu = 'yes';
	var bScroll = 'yes';
	var bResize = 'yes';
	var bHist = 'no';
	var bTitlebar  = 'yes';
	
	var strProp = "";  // Properties of the opened window
	
	// If there are no arguaments passed to the function then use the above defaults.
	
	if (OpenWin.arguments[0]){
		var url = OpenWin.arguments[0];
	
		if (OpenWin.arguments[1])
			winName = OpenWin.arguments[1];
		
		if (OpenWin.arguments[2])
			intWd = OpenWin.arguments[2];
			
		if (OpenWin.arguments[3])
			intHt = OpenWin.arguments[3];
	
		if (OpenWin.arguments[4])
			intXPos = OpenWin.arguments[4];
			
		if (OpenWin.arguments[5])
			intYpos = OpenWin.arguments[5];
			
		if (OpenWin.arguments[6])
			bTool = OpenWin.arguments[6];
			
		if (OpenWin.arguments[7])
			bLoc = OpenWin.arguments[7];
			
		if (OpenWin.arguments[8])
			bStatus = OpenWin.arguments[8];
			
		if (OpenWin.arguments[9])
			bMenu = OpenWin.arguments[9];
			
		if (OpenWin.arguments[10])
			bScroll = OpenWin.arguments[10];
			
		if (OpenWin.arguments[11])
			bResize = OpenWin.arguments[11];
			
		if (OpenWin.arguments[12])
			bHist = OpenWin.arguments[12];
			
		if (OpenWin.arguments[13])
			bTitlebar = OpenWin.arguments[13];
			
	
			
		if (intXPos < 1 ) 
		  if (window.screenLeft ) 
			intXPos = window.screenLeft + 20;
		  else
			intXPos = 20;

		if (intYpos < 1) 
		  if ( window.screenTop ) 
			intYpos = window.screenTop - 10;
		  else
			intYpos = 10;
	
		strProp = '';
		strProp	= strProp + "toolbar=" + bTool + ",location=" + bLoc + ",status=" + bStatus + ",menubar=" + bMenu + ","
		strProp	= strProp + "scrollbars=" + bScroll + ",resizable=" + bResize + ",titlebar=" + bTitlebar + ",copyhistory=" + bHist + ",";
		strProp	= strProp + "width=" + intWd + ",height=" + intHt + ",left=" + intXPos + ",top=" + intYpos + "";

		popupWin = window.open(url, winName,strProp);
		popupWin.focus();  // Place focus on new window
	}
	else
	{
		alert("Please provide the URL.")
	}
}
//---------------------------- End Window Open Template ---------------------------- //

function openWindow(url){
	OpenWin(url,'theWindow',740,400,-1,-1);
}

function openSmallWindow(url){
	OpenWin(url,'theWindow',350,250,100,100,'no','no','yes','no','yes','yes','no','no');
}
//----------------------------------------------------
// Used on Edu Question and Consideration pages to show answers in hidden divs
// Needs theQuestions[] with the id of answers to the questions and
//	liQuestions[] with ID of the links
	function showContent(objID)
	{
		for (i=0;i<theQuestions.length;i++)
		{
			hideObj(theQuestions[i]);
			if (objID == theQuestions[i]) // Find Current Question to show
				{qCurrentShowNum = i;}
		}
		showObj(objID);
	}
	function activate(name){
		for (i=0;i<liQuestions.length;i++)
		{
			changeStyle(liQuestions[i], 'inActive');
		}
		changeStyle(name,'active');
	}
	function changeStyle(name,oClass){
		var obj = null;
			if (document.getElementById)
			{
				obj = document.getElementById(name);
			}  else if (document.layers){
				obj = document.layers[name];
			}
			if 	( obj != null)
			{
				obj.className = oClass;			
			}
		}
	function showPrev(){
		// get previous
		qCurrentShowNum = qCurrentShowNum + theQuestions.length - 1 ;
		qCurrentShowNum = qCurrentShowNum % theQuestions.length;
		showContent(theQuestions[qCurrentShowNum]);
		activate(liQuestions[qCurrentShowNum]);
	}
	function showNext(){
		// get next
		qCurrentShowNum = qCurrentShowNum + 1 ;
		qCurrentShowNum = qCurrentShowNum % theQuestions.length;
		showContent(theQuestions[qCurrentShowNum]);
		activate(liQuestions[qCurrentShowNum]);
	}
//-----------------------------------------------------
// Use to confirm delete button
function confirmIt()
{
		if(confirm('Are you sure you want to delete this item?'))
		{
			return true;
		}
		else
		{
			return false;
		}
}

//----------------------------------------------------
// Show or hide an element , and swap image
// used in Right Hand Content area
	
function showHideWithImg(name, imgID ){
	var obj;
		if (document.getElementById)
		{
			obj = document.getElementById(name);
		}  else if (document.layers){
			obj = document.layers[name];
		}
		
		if (obj.style.display == "none"){
			obj.style.display = "block";
			changeImages(imgID, 'btnArrow_down');
			setCookie(name, "show", 7);
			}
		else{
			obj.style.display = "none";
			changeImages(imgID, 'btnArrow_left');
			setCookie(name, "hide", 7);
			}
			
}

// Show Element
function showObj(name ){
	var obj = null;
		if (document.getElementById)
		{
			obj = document.getElementById(name);
		}  else if (document.layers){
			obj = document.layers[name];
		}
		
		if 	( obj != null)
		{
			obj.style.display = "block";
		}
}

// Hide Element
function hideObj(name ){
	var obj = null;
		if (document.getElementById)
		{
			obj = document.getElementById(name);
		}  else if (document.layers){
			obj = document.layers[name];
		}
		if 	( obj != null)
		{
			obj.style.display = "none";			
		}
}

	
// Standard Rollover image
function changeImages() // By ID
{ 	if (document.images && imgPreLoad )
	{
   		for (var i=0; i<changeImages.arguments.length; i+=2)
   		{
			document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
   		}
	}
}
// Rollover image used on some pages
function swap() // By ID
{ 	if (document.images && imgPreLoad )
	{
   		for (var i=0; i<swap.arguments.length; i+=2)
   		{
			document[swap.arguments[i]].src = eval(swap.arguments[i+1] + ".src");
   		}
	}
}

//----------------------------------------------------
// Show Element
function showObj(name ){
	var obj=null;
		if (document.getElementById)
		{
			obj = document.getElementById(name);
		}  else if (document.layers){
			obj = document.layers[name];
		}
		if (obj!=null){
			obj.style.display = "block";
		}
		
}

// Hide Element
function hideObj(name ){
	var obj=null;
		if (document.getElementById)
		{
			obj = document.getElementById(name);
		}  else if (document.layers){
			obj = document.layers[name];
		}
		if (obj!=null){
			obj.style.display = "none";	
		}
}		

//----------------------------------------------------
// Product Menu
	var theTimer = null;
	
function showMenu(){
		if (theTimer != null){
				clearTimeout(theTimer);
			}
		changeStyle('menuList','showMenu');
	}
	
function hideTheMenu(){
		changeStyle('menuList','hideMenu');
	}	
	
function hideMenu(){
		if (theTimer != null){
				clearTimeout(theTimer);
			}
		theTimer = setTimeout("hideTheMenu()",2000); 
	}	
function changeStyle(name,oClass){
	var obj = null;
		if (document.getElementById)
		{
			obj = document.getElementById(name);
		}  else if (document.layers){
			obj = document.layers[name];
		}
		if 	( obj != null)
		{
			obj.className = oClass;			
		}
	}
//----------------------------------------------------
var strPath = "";
if(document.images)
{
	// on Home Page images
	imgKit_on = new Image();
	imgKit_on.src = strPath + "/images/mnuTabKitOn.gif";

	imgKit_off = new Image();
	imgKit_off.src = strPath + "/images/mnuTabKitOn.gif";
	
	imgKit_over = new Image();
	imgKit_over.src = strPath + "/images/mnuTabKitOn.gif";
	
	
	
	
	imgTes_on = new Image();
	imgTes_on.src = strPath + "/images/mnuTabTestimonialsOn.gif";

	imgTes_off = new Image();
	imgTes_off.src = strPath + "/images/mnuTabTestimonialsOff.gif";
	
	imgTes_over = new Image();
	imgTes_over.src = strPath + "/images/mnuTabTestimonialsOff.gif";
	
	
	
	imgProd_on = new Image();
	imgProd_on.src = strPath + "/images/mnuTabProductOn.gif";

	imgProd_off = new Image();
	imgProd_off.src = strPath + "/images/mnuTabProductOff.gif";
	
	imgProd_over = new Image();
	imgProd_over.src = strPath + "/images/mnuTabProductOff.gif";
	
	imgProddoors_on = new Image();
	imgProddoors_on.src = strPath + "/images/mnuTabdoorsOn.gif";

	imgProddoors_off = new Image();
	imgProddoors_off.src = strPath + "/images/mnuTabdoorsOff.gif";
	
	imgProddoors_over = new Image();
	imgProddoors_over.src = strPath + "/images/mnuTabdoorsOff.gif";
	
	imgEdu_on = new Image();
	imgEdu_on.src = strPath + "/images/mnuTabEducationOn.gif";

	imgEdu_off = new Image();
	imgEdu_off.src = strPath + "/images/mnuTabEducationOff.gif";
	
	imgEdu_over = new Image();
	imgEdu_over.src = strPath + "/images/mnuTabEducationOff.gif";

    doublehungOff = new Image();
    doublehungOff.src = "/images/prodMnu/mnu_doublehungIcon_OFF.gif";

    doublehungRoll = new Image();
    doublehungRoll.src = "/images/prodMnu/mnu_doublehungIcon_OVER.gif";
    
    doublehungOn = new Image();
    doublehungOn.src = "/images/prodMnu/mnu_doublehungIcon_ON.gif";
    
    casementOff = new Image();
    casementOff.src = "/images/prodMnu/mnu_casementIcon_OFF.gif";

    casementRoll = new Image();
    casementRoll.src = "/images/prodMnu/mnu_casementIcon_OVER.gif";
    
    casementOn = new Image();
    casementOn.src = "/images/prodMnu/mnu_casementIcon_ON.gif";
    
    pictureOff = new Image();
    pictureOff.src = "/images/prodMnu/mnu_pictureIcon_OFF.gif";

    pictureRoll = new Image();
    pictureRoll.src = "/images/prodMnu/mnu_pictureIcon_OVER.gif";
    
    pictureOn = new Image();
    pictureOn.src = "/images/prodMnu/mnu_pictureIcon_ON.gif";
    
    sliderOff = new Image();
    sliderOff.src = "/images/prodMnu/mnu_sliderIcon_OFF.gif";

    sliderRoll = new Image();
    sliderRoll.src = "/images/prodMnu/mnu_sliderIcon_OVER.gif";
    
    sliderOn = new Image();
    sliderOn.src = "/images/prodMnu/mnu_sliderIcon_ON.gif";
    
    awningOff = new Image();
    awningOff.src = "/images/prodMnu/mnu_awningIcon_OFF.gif";

    awningRoll = new Image();
    awningRoll.src = "/images/prodMnu/mnu_awningIcon_OVER.gif";
    
    awningOn = new Image();
    awningOn.src = "/images/prodMnu/mnu_awningIcon_ON.gif";
    
    bayOff = new Image();
    bayOff.src = "/images/prodMnu/mnu_bayIcon_OFF.gif";

    bayRoll = new Image();
    bayRoll.src = "/images/prodMnu/mnu_bayIcon_OVER.gif";
    
    bayOn = new Image();
    bayOn.src = "/images/prodMnu/mnu_bayIcon_ON.gif";
    
    gardenOff = new Image();
    gardenOff.src = "/images/prodMnu/mnu_gardenIcon_OFF.gif";

    gardenRoll = new Image();
    gardenRoll.src = "/images/prodMnu/mnu_gardenIcon_OVER.gif";
    
    gardenOn = new Image();
    gardenOn.src = "/images/prodMnu/mnu_gardenIcon_ON.gif";
    
    geometricOff = new Image();
    geometricOff.src = "/images/prodMnu/mnu_geometricIcon_OFF.gif";

    geometricRoll = new Image();
    geometricRoll.src = "/images/prodMnu/mnu_geometricIcon_OVER.gif";
    
    geometricOn = new Image();
    geometricOn.src = "/images/prodMnu/mnu_geometricIcon_ON.gif";
    
    patioOff = new Image();
    patioOff.src = "/images/prodMnu/mnu_patioIcon_OFF.gif";

    patioRoll = new Image();
    patioRoll.src = "/images/prodMnu/mnu_patioIcon_OVER.gif";
    
    patioOn = new Image();
    patioOn.src = "/images/prodMnu/mnu_patioIcon_ON.gif";
    
    overviewOff = new Image();
    overviewOff.src = "/images/tabMenu/tabOverviewOff.gif";

    overviewRoll = new Image();
    overviewRoll.src = "/images/tabMenu/tabOverviewOver.gif";
    
    overviewOn = new Image();
    overviewOn.src = "/images/tabMenu/tabOverviewOn.gif";
    
	shapesOff = new Image();
    shapesOff.src = "/images/tabMenu/tabShapesOff.gif";

    shapesRoll = new Image();
    shapesRoll.src = "/images/tabMenu/tabShapesOver.gif";
    
    shapesOn = new Image();
    shapesOn.src = "/images/tabMenu/tabShapesOn.gif";
	
    featuresOff = new Image();
    featuresOff.src = "/images/tabMenu/tabFeaturesOff.gif";

    featuresRoll = new Image();
    featuresRoll.src = "/images/tabMenu/tabFeaturesOver.gif";
    
    featuresOn = new Image();
    featuresOn.src = "/images/tabMenu/tabFeaturesOn.gif";
    
    photoOff = new Image();
    photoOff.src = "/images/tabMenu/tabPhotoOff.gif";

    photoRoll = new Image();
    photoRoll.src = "/images/tabMenu/tabPhotoOver.gif";
    
    photoOn = new Image();
    photoOn.src = "/images/tabMenu/tabPhotoOn.gif";
    
    optionsOff = new Image();
    optionsOff.src = "/images/tabMenu/tabOptionsOff.gif";

    optionsRoll = new Image();
    optionsRoll.src = "/images/tabMenu/tabOptionsOver.gif";
    
    optionsOn = new Image();
    optionsOn.src = "/images/tabMenu/tabOptionsOn.gif";
	
//////////////////////////////////////// EDU Nav
    learnOff = new Image();
    learnOff.src = "/images/education/learnBasicsOff.gif";

    learnRoll = new Image();
    learnRoll.src = "/images/education/learnBasicsRoll.gif";
    
    learnOn = new Image();
    learnOn.src = "/images/education/learnBasicsOn.gif";
	
    comparingOff = new Image();
    comparingOff.src = "/images/education/comparingWindowsOff.gif";

    comparingRoll = new Image();
    comparingRoll.src = "/images/education/comparingWindowsRoll.gif";
    
    comparingOn = new Image();
    comparingOn.src = "/images/education/comparingWindowsOn.gif";
	
    startedOff = new Image();
    startedOff.src = "/images/education/gettingStartedOff.gif";

    startedRoll = new Image();
    startedRoll.src = "/images/education/gettingStartedRoll.gif";
    
    startedOn = new Image();
    startedOn.src = "/images/education/gettingStartedOn.gif";
//////////////////////////////////////// EDU index
	
    iconLearnOff = new Image();
    iconLearnOff.src = "/images/education/iconLearnBasicsOff.gif";

    iconLearnRoll = new Image();
    iconLearnRoll.src = "/images/education/iconLearnBasicsOver.gif";
    
    iconLearnOn = new Image();
    iconLearnOn.src = "/images/education/iconLearnBasicsOn.gif";
	
    iconComparingOff = new Image();
    iconComparingOff.src = "/images/education/iconComparingOff.gif";

    iconComparingRoll = new Image();
    iconComparingRoll.src = "/images/education/iconComparingOver.gif";
    
    iconComparingOn = new Image();
    iconComparingOn.src = "/images/education/iconComparingOver.gif";
	
    iconReadyOff = new Image();
    iconReadyOff.src = "/images/education/iconReadyToBuyOff.gif";

    iconReadyRoll = new Image();
    iconReadyRoll.src = "/images/education/iconReadyToBuyOver.gif";
    
    iconReadyOn = new Image();
    iconReadyOn.src = "/images/education/iconReadyToBuyOn.gif";
	
////////////////////////////////////////
    qOverviewRoll = new Image();
    qOverviewRoll.src = "/images/education/learn/qboxOverviewOver.gif";
    
    qOverviewOn = new Image();
    qOverviewOn.src = "/images/education/learn/qboxOverviewOn.gif";
    
    qOverviewOff = new Image();
    qOverviewOff.src = "/images/education/learn/qboxOverviewOff.gif";
    
    qQuestionsRoll = new Image();
    qQuestionsRoll.src = "/images/education/learn/qboxQuestionsOver.gif";
    
    qQuestionsOn = new Image();
    qQuestionsOn.src = "/images/education/learn/qboxQuestionsOn.gif";
    
    qQuestionsOff = new Image();
    qQuestionsOff.src = "/images/education/learn/qboxQuestionsOff.gif";
    
    qResourcesRoll = new Image();
    qResourcesRoll.src = "/images/education/learn/qboxResourcesOver.gif";
    
    qResourcesOn = new Image();
    qResourcesOn.src = "/images/education/learn/qboxResourcesOn.gif";
    
    qResourcesOff = new Image();
    qResourcesOff.src = "/images/education/learn/qboxResourcesOff.gif";
  
    qConsiderationsRoll = new Image();
    qConsiderationsRoll.src = "/images/education/learn/qboxConsiderationsOver.gif";
    
    qConsiderationsOn = new Image();
    qConsiderationsOn.src = "/images/education/learn/qboxConsiderationsOn.gif";
    
    qConsiderationsOff = new Image();
    qConsiderationsOff.src = "/images/education/learn/qboxConsiderationsOff.gif";
    
///////////////////////////////
	imgPreLoad = true;

}

function handleClick(iIndx) {
	if (flashProxy && flashProxy2) {
		flashProxy.call('showFeature', iIndx);
		flashProxy2.call('showFeature', iIndx);
	}
}

function managezip() {
	if ($F("fldZip") == "Enter Zip") {
		$("fldZip").value = "";
	}
	if (isNaN($F("fldZip"))) {
		$("theZip").value = "";
	} else {
		$("theZip").value = $F("fldZip");
	}
}