﻿<!--
var isNetscape = (document.layers) ? true : false;
var isStandard = (document.getElementById) ? true : false;
var isIe = (document.all) ? true : false
var LstrShownControl = "";
var LobjTimeout = null;

function RetrieveControlByName(PstrControlName)
{
	var LobjControl;
    
	if ( isNetscape) { LobjControl = document.layers[PstrControlName]; }
	else if ( isIe ) { LobjControl = document.all[PstrControlName]; }
	else if ( isStandard ) {LobjControl = document.getElementById( PstrControlName ); }
	return LobjControl;
}

function HideOnTimeout( PstrControlName )
{
	RetrieveControlByName( PstrControlName ).style.visibility = 'hidden';
}

function ShowSteps( PstrControlName )
{
	if (LstrShownControl != "" )
	{
		RetrieveControlByName( LstrShownControl ).style.visibility = 'hidden';
	}
	RetrieveControlByName( PstrControlName ).style.visibility = 'visible';
	LstrShownControl = PstrControlName;
}

function KeepShown()
{
	if (LobjTimeout != null )
	{
		clearTimeout( LobjTimeout );
	}
	
}

function HideSteps( PstrControlName )
{
	//LobjTimeout = setTimeout( "HideOnTimeout('" + PstrControlName + "')", 2000 );
	RetrieveControlByName( PstrControlName ).style.visibility = 'hidden';
}

function ShowEmailFriendWindow( PstrProductId, PstrProductName )
{
	var windowLeft, windowTop, windowHeight, windowWidth;
	windowWidth = 550; windowHeight = 475;
	var windowOptions = 'height=' + windowHeight + ',width=' + windowWidth + ',top=' + ( screen.height - windowHeight )/2 +
		',left=' + (screen.width - windowWidth) / 2 + 
		',location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no';
	
	var openWindow = window.open( '/TellAFriend.aspx?productId=' + PstrProductId + '&productName=' + PstrProductName,
		'TellAFriend',
		 windowOptions);
	
}

function ShowPgWindow( PstrProductName )
{
	var windowLeft, windowTop, windowHeight, windowWidth;
	
	if ( isIe )
	{
		windowHeight = 430;
		windowWidth = 505; 
	}
	else
	{
		windowWidth = 475; 
		windowHeight = 390;
	}
	
	var windowOptions = 'height=' + windowHeight + ',width=' + windowWidth + ',top=' + ( screen.height - windowHeight )/2 +
		',left=' + (screen.width - windowWidth) / 2 + 
		',location=no,menubar=yes,resizable=yes,scrollbars=yes,status=no,toolbar=yes';
	
	var openWindow = window.open( '/BestDealComparisons.aspx?searchString=' + PstrProductName,	"",windowOptions);
}

-->