var m_processingcaption = 'Processing';
var m_pbarCart = null;
var m_pbarMA = null;
var m_pnlinks;
var m_crumbs;
var m_mhFixed = false;
var m_isHome = false;
var m_isSegHome = false;
var m_mda = null;
var m_printLink = null;
var m_emailLink = false;
var m_helpLink = null;
var m_production = true;
var m_menudef = "/content/public/menu.aspx";
var m_avgChW = 6;
var m_crumbRegEx1 = /<.*>/g;
var m_crumbRegEx2 = /&nbsp;/g;
var m_crumbRegEx3 = /&~ck=bt/g;
var m_subNavLinksDisplay = false;
var m_subNavIconsDisplay = false;
var m_largeFont = false;
var m_supressSubNav = false;
var m_stdEmpty = "";
var m_stdOffImg;
var m_activeTab = null;
var m_pbarStripAjax = null;
var m_pbarNavAjax = null;
var m_pbarContentAjax = null;
var m_defaultTabs = false;
var m_pbarPfx = "";
var m_phoneTitle = null;
var m_phoneMsg = null;
var m_phoneTariff = null;
var m_pbarContentDiv = null;
var m_pageTab = null;
var m_mastheadWidth = 928;
var m_pbarTabEnabled = false;
var m_pbarTabTitle = "My Account";
var m_tabNav = false;
var m_pbarCartEnabled = false;
var m_pbarMAEnabled = false;
var m_toolBoxLinks = null;
var m_pbarLinks = null;
var m_pbarStripContent = null;
var m_buyonlineMessage = null;
var m_subNavLinkWidth = null;
var m_searchTypes = null;
var m_searchTemp = null;
var m_myAccountLink = null;
var m_timeoutOpenDelay = null;
var m_timeoutCloseDelay = null;
var m_tabContentDiv = null;
var m_maIframe = false;
var Screen = new GetScreen();
var m_cartPages = new Array();
var loaded = new Array();
var onloadFired = false;
var m_isRtl = false;
var m_clientVars = null;
var m_isCenter = true;
var m_isPopupIntention = false;
var m_runSafeLoad = false;

var shrink = 0
var isbloated = false;
var isbloating = false;
var m_fromAddToCart = false
var ContainerHeight = 0
var increment = 0
var intShow
var m_id
var blockcollapse = false

var variations = new Array()
var hasXosLoaded = false;

var m_menuload = new Array();
var m_menuloaded = false;

var m_popClose = "Close";

function AddToVariation ( name )
{
variations[variations.length] = name;
}



function DisplayLevel(element)
{
if(element.className.indexOf("xos-attribute") != -1)
						element.className = element.className.replace(/\bxos-attribute\b/, '');
    				else
						element.style.display = "";
}

function showElement(levelName, attributename) {
            var element = XOS.getElement(levelName);
     			if(element == null) {
					
                    element = XOS.getElement(attributename);
    			 
    			}
            if (element != null)
    			{
    			    DisplayLevel(element);
    			}
    			
  			}
  			
function treatmentHandler(treatment) {

 			for (i=0; i<variations.length;i++)
 			{
 			    var variation = variations[i];
 			    
 			    try
 			    {
 			       var varid = treatment[variation];
 			   
		            if( typeof(varid) != "undefined" )
                    {
 			            var levelid = varid.LEVEL;
 			            showElement(varid, variation);
 			        }
 			    }
 			    catch(e)
 			    {

 			         var defaultObj = document.getElementById(variation); 
 			         DisplayLevel(defaultObj);
 			    }
            }	  			
 		}
 		
function betaShow ( id, mboxname )
    {

       var divCnt = document.getElementById  (id );
     
       if (divCnt == null)
       {
         try
         {
         mboxFactoryDefault.get(mboxname,0).setOffer(new mboxOfferDefault()).activate(); 
         }
         catch(e)
         {
         }
       }
       else
       {
        divCnt.style.display='block';
       }
    }
    

function writeMH( phoneTitle, phoneMsg, phoneTariff, segmentTitle, hasLocale, logoLink, pnmsg )
{
    document.write("<div id=\"trailimageid\" style=\"position:absolute;visibility:hidden;left:0px;top:0px;width:1px;height:1px;font-family:arial,helvetica;font-size:8.5pt\"><span id=\"processingCaptionID\">Andy....</span><img src=\""+ m_imgPfx +"/images/ajax-loader.gif\" border=\"0\"></div>");
	document.write( "<div id=\"iframeContainer\" style=\"position:absolute;\"></div>" );
	document.domain=document.domain;
	m_phoneTitle = phoneTitle;
	m_phoneMsg = phoneMsg;
	m_phoneTariff = phoneTariff;
	
	
	
	document.writeln ( "<!-- begin masthead -->" );
	m_stdOffImg = "<img src=\"" + m_imgPfx + "/images/global/brand/icons/smextlink.gif\", width=\"16\" height=\"9\" border=\"0\"/>";
	autoconfig();
	if ( typeof(m_suppressPrintLink) != "undefined" )
	{
		m_printLink = null;
	}
	if ( typeof(m_menuBar) == "undefined" )
	{
		if( !m_production )
		{
			document.write( "<div class=\"para\" style=\"color:red; font-weight:bold\">There is a problem with the menu definition. " );
			document.write( "<a href=\"" + m_menudef + "\">Click here to view</a></div>" );
			return;
		}
		return;
	}
	if( m_largeFont )
	{
		m_avgChW = m_avgChW + 2;
	}
	m_mhFixed = true;
	if( typeof(m_printableText) == "undefined" )
	{
		m_printableText = m_printText;
	}
	if( typeof(m_helptext) == "undefined" )
	{
		m_helptext = "help";
	}
	document.writeln( "<a name=\"mastheadtop\"></a>" );
	document.write ( "<table id=\"masthead\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"" );
	/*if( typeof( m_mastheadWidth ) != "undefined" )
	{
		//document.write(" width=\"" + m_mastheadWidth + "\"" );
		
	}*/
	document.write(" width=\"100%\"" );
	
	//document.write( "><tr><td valign=\"bottom\" rowspan=\"2\">" );
	document.write( "><tr><td valign=\"bottom\" rowspan=\"2\" class=\"LogoTDWidth\">" );
	
	document.write( "<div class=\"logocontainer\" id=\"logocontainer\">" );
	document.write( "<a href=\"#skipMH\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" alt=\"Skip to main content\" border=\"0\" width=\"1\" height=\"1\" /></a>" );
	if( typeof( m_nothomelogo ) != "undefined" )
	{
		m_nothomelogo = m_nothomelogo.replace ( "/images/global/brand/ui/logo.gif" , "/images/global/brand/ui/logo43.gif");
		if( logoLink )
		{
			document.write( "<a class=\"logolink\" href=\"" + m_homelink + "\">" );
		}
		document.write( "<img class=\"logo\" src=\"" + m_nothomelogo + "\" border=\"0\" width=\"109\" height=\"41\" alt=\"Dell\" />" );
		if( logoLink )
		{
			document.write( "</a>" );
		}
	}
	//document.write( "</div></td><td valign=\"top\" " + ((typeof(m_menuBar) != "undefined" && m_menuBar && m_menuBar.length > 0) ? "colspan=\"2\"" : "") + "><table id=\"pbarstriptable\" width=\"" + ((Screen.AvailableWidth > m_mastheadWidth) ? m_mastheadWidth - 109 : 619) + "\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"100%\">" );
	document.write( "</div></td><td valign=\"top\" width=\"100%\" " + ((typeof(m_menuBar) != "undefined" && m_menuBar && m_menuBar.length > 0) ? "colspan=\"2\"" : "") + "><table id=\"pbarstriptable\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"100%\">" );
	if( segmentTitle )
	{
		document.write( "<div class=\"mhTitle_SE\">" );
		document.write( segmentTitle );
		document.write( "</div>" );
	}
	else
	{
		renderBuyOnline();
	}
	document.write( "</td><td><div style=\"height:20px;\" /></td><td valign=\"top\">" );
	var ticks = new Date();
	if( !( m_pnlinks && m_subNavLinksDisplay && ( !m_supressSubNav ) ) && ( typeof( m_langSelectorUrl ) != "undefined") )
	{
		document.write( "<div class=\"lang_selector\">" );
		renderLanguageToggle();
		document.write( "</div>" );
	}
	document.write( "</td><td valign=\"top\">" );
	document.write( "<div class=\"pbarcontainer\" id=\"pbarcontainer\"><div id=\"pbarcontent\" name=\"pbar\" class=\"pbarcontent\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>" );
	renderToolBox();
	document.write( "<td><div id=\"pbarstripcontainer\"></div></td>" );
	
	renderPbarStrip();
	
	document.write( "</tr></table></div></div>" )
	document.write( "</td><td valign=\"top\">" );
	if( m_pbarLinks != null && m_pbarLinks.length > 0 )
	{
		document.write( "<div class=\"pbarlinks\" id=\"pbarlinks\">" );
		renderPbarLinks();
		document.write( "</div>" );
	}
	document.write( "</td></tr></table></td></tr><tr>" );
	if( typeof(m_menuBar) != "undefined" && m_menuBar && m_menuBar.length > 0 )
	{
		document.write( "<td valign=\"bottom\">" );
		var pageTab = null;
		var maxTab = (m_pbarTabEnabled && !m_tabNav) ? m_menuBar.length : (m_menuBar.length-1);
		var curUrl = hashTabUrl (window.location.href);
		var urlOverRide = false;
		var cookieTab = getCookie( "~tid" + pageCnty + pageLang + pageSeg + pageCS );
		if( cookieTab == "myaccountMenu" )
		{
			pageTab = m_menuBar.length;
		}
		else
		{
			for( n = 0; n < m_menuBar.length; n++ )
			{
				if( curUrl == hashTabUrl (m_menuBar[n].Href ) )
				{
					pageTab = n;
					if ( cookieTab != m_menuBar[n].Id )
					{
						SetCookie( "~tid" + pageCnty + pageLang + pageSeg + pageCS, m_menuBar[n].Id );
					}
					break;
				}
			}
		}
		if( cookieTab == "myaccountMenu" )
		{
			pageTab = m_menuBar.length;
		}
		if ( pageTab == null )
		{
			if( cookieTab != null && cookieTab.length > 0 )
			{
				for( n = 0; n < m_menuBar.length; n++ )
				{
					if( (cookieTab == m_menuBar[n].Id) || (cookieTab == n) )// string or int
					{
						pageTab = n;
						break;
					}
				}
			}
			else
			{
				for( n = 0; n < m_menuBar.length; n++ )
				{
					if( m_menuBar[n].IsSelectedTab )
					{
						m_pageTab = n;
						SetCookie( "~tid" + pageCnty + pageLang + pageSeg + pageCS, m_menuBar[ n].Id );
						break;
					}
				}
			}
		}
		var maLogin = getCookie( "~login");
		if( maLogin != "true" )
		{
			var qTab = getQueryVariable( "~tid" );
			if( qTab )
			{
				if( typeof(qTab) != "undefined" && !isNaN( parseInt( qTab ) ) && qTab <= maxTab )
				{
					pageTab = qTab;
					SetCookie( "~tid" + pageCnty + pageLang + pageSeg + pageCS, qTab ); // querystring int
				}
				for( n = 0; n < m_menuBar.length; n++ )
				{
					if( m_menuBar[n].Id.indexOf( qTab ) != -1 )
					{
						pageTab = n;
						SetCookie( "~tid" + pageCnty + pageLang + pageSeg + pageCS, m_menuBar[ n ].Id ); // querystring string
					}
				}
			}
			else // Tab Text
			{
				if( !isNaN( parseInt( m_pageTab ) ) )
				{
					if( m_pageTab <= maxTab )
					{
						pageTab = parseInt( m_pageTab );
					}
				}
				for( n = 0; n < m_menuBar.length; n++ )
				{
					if( m_pageTab == m_menuBar[n].Text || ((m_pageTab+"Menu") == m_menuBar[n].Id) )
					{
						pageTab = n;
					}
				}
			}
		}
		SetCookie( "~login", "" );
		if( pageTab == null )
		{
			m_pageTab = 0;
		}
		else
		{
			m_pageTab = pageTab;
		}
		document.write( "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\"><tr>" );
		renderPrimaryTabStrip();
		document.write( "<td width=\"100%\" valign=\"bottom\"><div class=\"tabspacer\" /></td>" );
		document.write( "</tr></table></td>" );
	}
	document.write( "<td>" );
	if ( typeof( m_supressSearch ) == "undefined" || m_supressSearch == false )
	{
		document.write( "<div class=\"searchcontainer\" id=\"searchcontainer\">");
		if( m_search )
		{
			if ( window.location.protocol== "https:")
			{
				m_search= m_search.replace(/http:\/\/i/g,"https://img");
			}
			document.write( m_search );
			var cat = getQueryVariable( "cat" );
			var kword = getQueryVariable( "k" );
			if( cat != null )
			{
				var input = getRawObject( "cat" );
				if( input )
				{
					input.value = cat;
				}
			}
			if( kword != null )
			{
				var kinput = getRawObject( "searchinput" );
				if( kinput )
				{
				    var kw = DecodeSearch( kword );
				    if( kw != undefined && kw.length > 0 )
				    {
    					kinput.value = kw;
				    }
				}
			}
		}
		else
		{
			renderSearchLinks();
		}
		var searchCombo = document.getElementById("cat");
        SetSeachComboTitle(searchCombo);
		document.write( "</div>" );
	}
	document.write( "</td></tr><tr><td colspan=\"3\">" );
	var noNav = "<div class=\"subnavcontainernomenu\" id=\"subnav\" ><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" border=\"0\" alt=\"\" height=\"5\" width=\"1\" /></div>";
	if( typeof(m_menuBar) != "undefined" && m_menuBar && m_menuBar.length > 0 )
	{
		if( (m_pageTab == m_menuBar.length) && m_pbarTabEnabled && !m_tabNav)
		{
			document.write( "<div class=\"subnavcontainer\" id=\"subnav\"></div>" );
			renderPbarTabNav( "pbarTab" );
		}
		else
		{
			if( typeof(m_menuBar[m_pageTab]) != "undefined" && m_menuBar[m_pageTab].MenuItems.length > 0 && !m_tabNav )
			{
				document.write( "<div class=\"subnavcontainer\" id=\"subnav\">" );
				index = m_pageTab ;
				document.write( renderSecondaryTabStrip( m_menuBar[index] ) );
				document.write( "</div>" );
			}
			else
			{
				document.write( noNav );
			}
		}
	}
	else
	{
		document.write( noNav );
	}
	if( m_pnlinks && m_subNavLinksDisplay && (!m_supressSubNav) )
	{
		document.write( "<div class=\"secondarynavcontainer\">" );
		renderSubNavLinks(segmentTitle);
		document.write( "</div>" );
	}
	if( m_mda && !(m_isRtl) )
	{
		document.write( "<div class=\"mdabarcontainer\" id=\"mdabar\">" );
		document.write( "<span style='float:left'  class=\"mdainfo\">" );
		document.write( m_mda );
		document.write( "</span><span style='float:right' id=\"psinfo\"></span>" );
		document.write( "</div>" );
	}
	if( m_mda && m_isRtl )
	{
		document.write( "<div class=\"mdabarcontainer\" id=\"mdabar\">" );
		document.write( "<span style='float:right'  class=\"mdainfo\">" );
		document.write( m_mda );
		document.write( "</span><span style='float:left' id=\"psinfo\"></span>" );
		document.write( "</div>" );
	}
	if( segmentTitle )
    {
	    document.write( "<div style=\"float:right;padding:3px;\">" );
	    renderBuyOnline();
	    document.write( "</div>" );
    }
	if( m_crumbs )
	{
		document.write( "<div class=\"breadcrumbcontainer\">" );
		if(m_isRtl)
		renderMastheadCrumbsRtl(false);
		else
		renderMastheadCrumbs(false);
		document.write( "</div>" );
	}

	document.write ( "</td></tr></table>" );
	document.write ( "<a name=\"skipMH\"></a>" );
	document.writeln ( "<!-- end masthead -->" );
	bindMastHeadFlyouts();
}
// set the title of the search combo
function SetSeachComboTitle (SelectObj)
{
    if (SelectObj)
    {
        if (SelectObj.selectedIndex > -1)
        {
            if (SelectObj.options[SelectObj.selectedIndex].value != "")
            { 
                 var searchCombo = document.getElementById("cat");
                 if (searchCombo)
                 {
                    searchCombo.title = SelectObj.options[SelectObj.selectedIndex].text;
                 }
            }
        }
    }
}
function renderBuyOnline()
{
	if( m_phoneTitle || m_phoneMsg )
	{
		if(m_isRtl)
		{
			buyOnlineStyle= "right";
			buyOnlineAlign="left";
		}
		else
		{
			buyOnlineStyle= "left";
			buyOnlineAlign="right";
		}
		document.write( "<div class=\"message_buyonline\">" );
		if( m_phoneTitle )
		{
			document.write("<div style=\"float:"+ buyOnlineStyle + ";padding-" + buyOnlineAlign + ":3px\">")
			document.write( m_phoneTitle );
			document.write("</div>")
		}
		if( m_phoneMsg )
		{
			document.write("<div style=\"float:" + buyOnlineStyle +";padding-" + buyOnlineAlign +":3px\">")
			document.write( m_phoneMsg );
			document.write("</div>")
		}
		if( m_phoneTariff )
		{
			document.write("<div style=\"float:" + buyOnlineStyle + "\">")
			document.write( "<span class=\"mhTextNewTrf\">" + m_phoneTariff + "</span>" );
			document.write("</div>")
		}
		document.write( "</div>" );
	}
}
var isCSS = false;
var isW3C = false;
var isIE4 = false;
var isNN4 = false;
var isIE6 = false;
var isGecko = false;
var isOpera = false;
var isDHTML = false;
var isSafari = false;
var suppressMenus = false;
var m_anchorClicked = false;
var pageSeg = getCookieKeyValue(" lwp","s");
var pageLang = getCookieKeyValue(" lwp","l");
var pageCnty = getCookieKeyValue(" lwp","c");
var pageCS = getCookieKeyValue(" lwp","cs");
function hashTabUrl( url)
{
	if(url== null )
	{
		return "";
	}
	url = url.toLowerCase();
	var urlParts = url.split ("?");
	if ( urlParts.length == 0 )
	{
		return "";
	}
	var hash = urlParts[0];
	if ( urlParts.length == 1 )
	{
		return hash;
	}
	var qParts = urlParts[1].split("&");
	var ignore = new Array("c","l","s","cs");
	for ( i =0 ; i < qParts.length ; i++ )
	{
		var qPair = qParts[i].split ("=");
		if ( qPair.length > 1 )
		{
			var skip = false;
			if ( qPair[0].length > 1 && qPair[0].substring(0,1)=="~" )
			{
				skip= true;
			}
			else
			{
				for ( j=0;j<ignore.length ; j++ )
				{
					if ( qPair[0]== ignore[j])
					{
						skip = true;
						break;
					}
				}
			}
			if ( !skip )
			{
				hash +=qParts[i];
			}
		}
	}
	return hash;
}
function getCookieKeyValue( cname, id, caseSensitive )
{
	try
	{
	    var offset = 1;
	    var sid = id + "=";
		var sid1 = "?" + id + "=";
		var sid2 = "&" + id + "=";
		var lwp = getCookie( cname );
		var startIdx = 0;
		var endIdx = 0;
		var kvalue = null;
		if( lwp.indexOf(sid1) != -1 )
		{
		    sid = sid1;
		    offset = 2;
		}
		if( lwp.indexOf(sid2) != -1 )
		{
		    sid = sid2;
		    offset = 2;
		}
		if( lwp.indexOf(sid) == -1 )
		{
			return null;
		}
		else
		{
			startIdx = lwp.indexOf(sid) + id.length + offset;
			if( lwp.substring( startIdx ).indexOf( "&" ) == -1 )
			{
				return lwp.substring( startIdx );
			}
			else
			{
				endIdx = lwp.substring( startIdx ).indexOf( "&" ) + startIdx;
			}
		}
		kvalue = lwp.substring( startIdx, endIdx );
	}
	catch(e)
{}
	if( caseSensitive == true )
	{
		return kvalue;
	}
	else
	{
		return kvalue.toLowerCase();
	}
}

function autoconfig()
{
	if(document && document.images)
	{
		isCSS = (document.body && document.body.style) ? true : false;
		isW3C = (isCSS && document.getElementById) ? true : false;
		isIE4 = (isCSS && document.all && readIEVer() >= 4.0) ? true : false;
		isNN4 = (document.layers) ? true : false;
		isGecko = (isCSS && navigator && navigator.product && navigator.product == "Gecko");
		isOpera = (isCSS && navigator.userAgent.indexOf( "Opera") != -1 );
		isSafari = (isCSS && navigator.userAgent.indexOf( "Safari") != -1 );
		isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;
		isIE6 = ( isIE6CSS && readIEVer() >= 6.0 );
		isDHTML = isCSS && ( isIE4 || isGecko || isOpera );
		if( suppressMenus )
		{
			isDHTML = false;
		}
		else if( isOpera && readOperaVer() < 7 )
		{
			isDHTML = false;
		}
		else if( isGecko && navigator.productSub <= 20011022 )
		{
			isDHTML = false;
		}
		else if( isGecko && navigator.productSub == 20030107 )
		{
			var x = navigator.userAgent.indexOf( "AppleWebKit" );
			if( x > -1 )
			{
				isDHTML = ( navigator.userAgent.substring( x + 12, x + 15 ) ) > 300;
			}
			else
			{
				isDHTML = false;
			}
		}
		m_clientVars = new ClientVars();
	}
}
function SetClientVar( cname, cvalue )
{
	var cVars = getCookie( "ClientVars" );
	if( cvalue != null )
	{
		if( cVars.indexOf( cname ) > -1 )
		{
			cVars = StripCookieValue( cVars, cname );
		}
		cVars = cVars + "&" + cname + "=" + cvalue;
		document.cookie = "ClientVars=" + ((cVars.indexOf( "&" ) == 0) ? cVars.substring( 1, cVars.length) : cVars ) + ";path=/;domain=dell.com;";
	}
}
function readIEVer()
{
	var agent = navigator.userAgent;
	var offset = agent.indexOf( "MSIE" );
	if( offset < 0 )
	{
		return 0;
	}
	return parseFloat( agent.substring( offset + 5, agent.indexOf( ";", offset ) ) );
}
function BandWidthRedir ( url )
{
	var bWidth = Bandwidth();
	if ( bWidth == "Modem" )
	{
		document.location.href = url ;
	}
}
function readOperaVer()
{
	var agent = navigator.userAgent;
	var offset = agent.indexOf( "Opera" );
	if( offset < 0 )
	{
		return 0;
	}
	return parseFloat( agent.substring( offset + 6 ) );
}
function renderPrimaryTabStrip()
{
	var menuHeaderID;
	if( isIE6 )
	{
		bodyTag.style.behavior = "url(#default#clientCaps)";
		m_colorDepth = bodyTag.colorDepth;
	}
	var cssPrefix = "inactivetab";
	for( n = 0; n < m_menuBar.length; n++ )
	{
		if( n == m_pageTab )
		{
			cssPrefix = "activetab";
		}
		var index = n;
		if( ( m_menuBar[n].Href != null && m_menuBar[n].Href.length > 0 ) || m_tabNav )
		{
			var item = m_menuBar[n];
			document.write( "<td width=\"4px\" vAlign=\"top\" >" );
			document.write( "<div id=\"" + m_menuBar[n].Id + "left\" class=\"" + cssPrefix + "left\"><div><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" height=\"22\" width=\"1\" /></div>" );
			if( m_tabNav )
			{
				if( item.MenuItems.length > 0 )
				{
					if( item.MenuItems.length > 0 )
					{
						document.write( "<div id=\"" + m_menuBar[n].Id + "TabNav\" class=\"floatingmenu\" onmouseover=\"TabNavActiveEvent( this )\" onmouseout=\"TabNavInActiveEvent( this )\">" );
					}
					else
					{
						document.write( "<div id=\"" + m_menuBar[n].Id + "TabNav\" onmouseover=\"TabNavInActiveClose()\" class=\"floatingmenu\">" );
					}
					document.write( "<table id=\"uniqueplaceholderIDpri\" class=\"mh_linklist\" cellspacing=\"0\" cellpadding=\"0\">" );
					var sep = "sub";
					for( var nn = 0; nn < item.MenuItems.length; nn++ )
					{
						var drop = item.MenuItems[nn];
						if( drop.Text != null )
						{
							document.write( "<tr><td class=\"" + sep + "\" onMouseOver=\"this.className='" + sep + "hover';\" onMouseOut=\"this.className='" + sep + "';\"><a class=\"menulink\" onclick=\"SwapTab('" + m_menuBar[n].Id + "', null, " + n + ")\" href=\"" + createNavLink( drop.Href, n ) + "\" " + drop.TargetHtml + ">" + drop.Text );
							if( drop.OffDell )
							{
								document.write( m_stdOffImg );
							}
							document.write( "</a></td></tr>" );
						}
						sep = drop.IsSeparator ? "sep" : "sub";
					}
					document.write( "</table>" );
					document.write( "</div>" );
				}
			}
			document.write( "</div></td>" );
			document.write( "<td>" );
			if( !m_tabNav )
			{
				document.write( "<div id=\"" + m_menuBar[n].Id + "\" class=\"" + cssPrefix + "\" id=\"" + m_menuBar[n].Id + "\" name=\"mh_tabselector\">" );
			}
			else
			{
				if( item.MenuItems.length > 0 )
				{
					document.write( "<div id=\"" + m_menuBar[n].Id + "\" onmouseover=\"TabNavActiveEvent( this )\" onmouseout=\"TabNavInActiveEvent( this )\" class=\"" + cssPrefix + "\" id=\"" + m_menuBar[n].Id + "\" name=\"mh_tabselector\">" );
				}
				else
				{
					document.write( "<div id=\"" + m_menuBar[n].Id + "\" onmouseover=\"TabNavInActiveClose()\" class=\"" + cssPrefix + "\" id=\"" + m_menuBar[n].Id + "\" name=\"mh_tabselector\">" );
				}
			}
			document.write( "<div onclick=\"SwapTab( '" + m_menuBar[index].Id + "', '" + createNavLink( m_menuBar[index].Href, n ) + "', " + index+ " )\" class=\"" + cssPrefix + "content\" id=\"" + m_menuBar[n].Id + "content\" align=\"center\" nowrap=\"1\">" );
			document.write( m_menuBar[n].Text );
			document.write( "</div></div></td>" );
		}
		else
		{
			document.write( "<td width=\"4px\" vAlign=\"top\" >" );
			document.write( "<div id=\"" + m_menuBar[n].Id + "left\" class=\"" + cssPrefix + "left\"></div>" );
			document.write( "</td>" );
			document.write( "<td><div onclick=\"swapSecondaryTabStrip('" + m_menuBar[n].Id + "','" + index + "')\" class=\"" + cssPrefix + "\" id=\"" + m_menuBar[n].Id + "\" name=\"mh_tabselector2\">" );
			document.write( "<div class=\"" + cssPrefix + "content\" id=\"" + m_menuBar[n].Id + "content\" align=\"center\" style=\"cursor:pointer\" nowrap=\"1\">" );
			document.write( m_menuBar[n].Text );
			document.write( "</div></div></td>" );
		}
		if( n == m_pageTab )
		{
			m_activeTab = getRawObject( m_menuBar[m_pageTab].Id );
		}
		cssPrefix = "inactivetab";
	}
	if( m_pbarTabEnabled && !m_tabNav)
	{
		if( isSafari && m_myAccountLink )
		{
			document.write( "<td width=\"4px\" vAlign=\"top\" >" );
			document.write( "<div id=\"pbarTableft\" class=\"" + cssPrefix + "left\"></div>" );
			document.write( "</td>" );
			document.write( "<td><div onclick=\"window.location='" + m_myAccountLink + "';\" class=\"" + cssPrefix + "\" id=\"pbarTab\" name=\"mh_tabselector2\">" );
			document.write( "<div class=\"" + cssPrefix + "content\" id=\"pbarTabcontent\" align=\"center\" style=\"cursor:pointer\" nowrap=\"1\">" );
			document.write( m_pbarTabTitle );
			document.write( "</div></div></td>" );
		}
		if( !isSafari )
		{
			var link = (window.location.href.indexOf( "~tid" ) == -1) ? (window.location.href + "&~tid=" + m_menuBar.length) : window.location.href.replace("~tid=" + getQueryVariable("~tid"), "~tid=" + (m_menuBar.length) );
			document.write( "<td width=\"4px\" vAlign=\"top\" >" );
			document.write( "<div id=\"pbarTableft\" class=\"" + cssPrefix + "left\"></div>" );
			document.write( "</td>" );
			document.write( "<td><div onclick=\"renderPbarTabNav('pbarTab')\" class=\"" + cssPrefix + "\" id=\"pbarTab\" name=\"mh_tabselector2\">" );
			document.write( "<div class=\"" + cssPrefix + "content\" id=\"pbarTabcontent\" align=\"center\" style=\"cursor:pointer\" nowrap=\"1\">" );
			document.write( m_pbarTabTitle );
			document.write( "</div></div></td>" );
		}
	}
}
function createNavLink( url, tab )
{
	var link = null;
	if( url != null )
	{
		link = url;
	}
	return link;
}
function renderSearchLinks()
{
	if( m_searchLinks )
	{
		for( var n = 0; n < m_searchLinks.length; n++ )
		{
			if( n > 0 )
			{
				document.write( "<span class=\"mhSpace\">|</span>" );
			}
			var href = m_searchLinks[n].Href;
			var text = m_searchLinks[n].Text;
			document.write( "<span class=\"mh_search_sep_SE\" style=\"white-space:nowrap\"><a href=\"" + href + "\" class=\"para_small\">" + text + "</a></span>" );
		}
	}
}

function renderPbarLinks()
{
	if( m_pbarLinks )
	{
	    document.write( "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>" );
		for( var n = 0; n < m_pbarLinks.length; n++ )
		{
			if( n > 0 )
			{
				document.write( "<td valign=\"middle\" style=\"padding:0px 7px 0 7px;\"><div id=\"flyoutdivide\" class=\"fodivide\"><img src=\"" + m_imgPfx + "/images/global/masthead/flyoutdivide.gif\" width=\"1\" alt=\"\" border=\"0\" /></div></td>" );
			}
			var href = m_pbarLinks[n].Href;
			var text = m_pbarLinks[n].Text;
			var icon = m_pbarLinks[n].IconUrl;
			if( icon != undefined && icon != null && icon.length > 0 && icon.indexOf( ".com/" ) != -1)
			{
			    icon = m_imgPfx + icon.substring( icon.indexOf( ".com/" ) + 4 );
			    document.write( "<td valign=\"middle\"><img src=\"" + icon + "\" height=\"17px\" border=\"0\" alt=\"" + text + "\" /></td>" );
			}
			document.write( "<td valign=\"middle\" nowrap=\"true\"><span class=\"mh_search_sep_SE\" nowrap=\"1\"><a href=\"" + href + "\" class=\"para_small\">" + text + "</a></span></td>" );
		}
		document.write( "</tr></table>" );
	}
}
function swapSecondaryTabStrip( src, id )
{

	subNavContent = getRawObject( "subnav" );
	menu = m_menuBar[ id ];
	SwapTab( getRawObject( src ), null, id );
	subNavContent.innerHTML = renderSecondaryTabStrip( menu );
	bindMastHeadFlyouts();
}
function renderPbarTabNav( src )
{
	m_pageTab = m_menuBar.length;
	SwapTab( getRawObject( src ), null, m_pageTab );
	try
	{
		nav = getRawObject( "subnav" );
		if( nav.innerHTML.indexOf( "name=\"tabnav\"" ) == -1 )
		{
			AsyncXDomainIframeCall(m_pbarPfx + "/pbar/ajax.aspx?~psc=tabnav&menus=cart",pbarnavajax);
		}
	}
	catch(e)
{}
}
function renderSecondaryTabStrip( menu )
{
	var sep = "sub";
	var subNavHTML = "";
	for( var n = 0; n < menu.MenuItems.length; n++ )
	{
		var item = menu.MenuItems[n];
		if( item.Text != null )
		{
			if( isDHTML )
			{
				if( item.MenuItems )
				{
					subNavHTML += "<div id=\"mh_" + item.Id + n + "\" name=\"mh_subnavlink\" class=\"subnavlinkcontainer\">" +
					"<table cellpadding=\"0\" cellspacing=\"0\"><tr><td><a href=\"" + createNavLink( item.Href, n ) + "\" " + item.TargetHTML + " id=\"mh_" + item.Id + n + "link\" class=\"subnavlink\">" + item.Text + "</a></td><td><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" border=\"0\" height=\"1\" width=\"4\" alt=\"\" /></td><td valign=\"top\" width=\"5\" style=\"padding-top:6px;\"><img id=\"mh_" + item.Id + n + "carrot\" src=\"" + m_imgPfx + "/images/global/masthead/nav_down.gif\" border=\"0\" height=\"3\" width=\"5\" alt=\"\" /></td></tr><tr><td rowspan=\"3\">" +
					"<div id=\"mh_" + item.Id + n + "content\" class=\"floatingmenu\" onmouseover=\"ClearSubNavTimeOut(false);\">" +
					"<table id=\"uniqueplaceholderIDsec\" class=\"mh_linklist\" cellspacing=\"0\" cellpadding=\"0\">";
					for( var nn = 0; nn < item.MenuItems.length; nn++ )
					{
						var drop = item.MenuItems[nn];
						if( drop.Text != null )
						{
							subNavHTML += "<tr><td class=\"" + sep + "\" onMouseOver=\"this.className='" + sep + "hover';\" onMouseOut=\"this.className='" + sep + "';\"><a class=\"menulink\" href=\"" + createNavLink( drop.Href, n ) + "\" " + drop.TargetHtml + ">" + drop.Text;
							if( drop.OffDell )
							{
								subNavHTML += m_stdOffImg;
							}
							subNavHTML += "</a></td></tr>";
						}
						sep = drop.IsSeparator ? "sep" : "sub";
					}
					subNavHTML += "</table></div></td></tr></table></div>";
				}
				else
				{
					subNavHTML += "<div id=\"mh_" + item.Id + n + "\" name=\"mh_subnavlink\" class=\"subnavlinkcontainernomenu\">" +
					"<a href=\"" + createNavLink( item.Href, n ) + "\" " + item.TargetHTML + " id=\"mh_" + item.Id + n + "link\" class=\"subnavlinknomenu\">" + item.Text + "</a>" +
					"</div>";
				}
			}
			else
			{
				subNavHTML += "<div class=\"subnavlinkcontainernomenu\">" +
				"<a href=\"" + createNavLink( item.Href, n ) + "\" " + item.TargetHTML + " class=\"subnavlinknomenu\">" + item.Text + "</a>" +
				"</div>";
			}
			
		}
	}
	return subNavHTML;
}

function bindMastHeadFlyouts()
{
	if( !m_tabNav )
	{
    $j("div[@name='mh_subnavlink']").hover(
      function () {
        SubNavEventActive( $j(this) )
      }, 
      function () {
        SubNavEventInActive( $j(this) );
      }
    );
	}
}
function ParseDivObjects( targetName )
{
   
	var objs = document.getElementsByName( targetName );
	if( objs.length == 0 )
	{
		var targets = document.getElementsByTagName( "DIV" );
		var tmpObj;
		objs = new Array();
		for( var targetidx = 0; targetidx < targets.length; targetidx++ )
		{
			tmpObj = targets[targetidx];
			if( tmpObj.name == targetName )
			{
				objs.push( tmpObj );
			}
		}
	}
	return objs;
}
function ParseIFrameObjects( targetName )
{
	var objs = document.getElementsByName( targetName );
	if( objs.length == 0 )
	{
		var targets = document.getElementsByTagName( "IFRAME" );
		var tmpObj;
		objs = new Array();
		for( var targetidx = 0; targetidx < targets.length; targetidx++ )
		{
			tmpObj = targets[targetidx];
			if( tmpObj.name == targetName )
			{
				objs.push( tmpObj );
			}
		}
	}
	return objs;
}
function SwapTab( src, url, tab )
{
	var tablink = getRawObject( src );
	if ( m_activeTab != null )
	{
		m_activeTab.className = "inactivetab";
		getRawObject( m_activeTab.id + "left" ).className = "inactivetableft";
		getRawObject( m_activeTab.id + "content" ).className = "inactivetabcontent";
	}
	tablink.className = "activetab";
	getRawObject( tablink.id + "left" ).className = "activetableft";
	getRawObject( tablink.id + "content" ).className = "activetabcontent";
	if( m_menuBar.length == tab )
	{
		SetCookie( "~tid" + pageCnty + pageLang + pageSeg + pageCS, "myaccountMenu" );
	}
	else
	{
		SetCookie( "~tid" + pageCnty + pageLang + pageSeg + pageCS, m_menuBar[tab].Id );
	}
	m_activeTab = tablink;
	if( url != null )
	{
		document.location = url;
	}
}
function TabNavActiveEvent( src )
{

	if( m_timeoutCloseDelay )
	{
		ClearSubNavTimeOut(false);
	}
	if( m_tabContentDiv != src.id )
	{
		var content = getRawObject( src.id + "TabNav" );
		if( content != null )
		{
			if( m_tabContentDiv != null )
			{
				TabNavInActiveClose();
			}
			m_tabContentDiv = src.id;
			if ( m_activeTab.id != src.id )
			{
				src.className = "activetabhover";
				getRawObject( src.id + "left" ).className = "activetabhoverleft";
				getRawObject( src.id + "content" ).className = "activetabhovercontent";
				if( m_activeTab != null )
				{
					m_activeTab.style.zIndex = 1;
				}
			}
			content.style.display = "block";
		}
	}
}
function TabNavInActiveEvent( src )
{
	if( !m_timeoutCloseDelay )
	{
		m_timeoutCloseDelay = setTimeout( "TabNavInActiveClose()",500 );
	}
}
function TabNavInActiveClose()
{
	var src = getRawObject( m_tabContentDiv );
	var content = getRawObject( m_tabContentDiv + "TabNav" );
	if( content != null && m_tabContentDiv )
	{
		if ( m_activeTab.id != m_tabContentDiv )
		{
			src.className = "inactivetab";
			getRawObject( src.id + "left" ).className = "inactivetableft";
			getRawObject( src.id + "content" ).className = "inactivetabcontent";
			if( m_activeTab != null )
			{
				m_activeTab.style.zIndex = 2;
			}
		}
		content.style.display = "none";
		m_tabContentDiv = null;
	}
}
function SubNavEventActiveString( str )
{
	SubNavEventInActiveOpen(getRawObject(str) );
}
function SubNavEventActive( src )
{
    var id = src.attr("id");
	m_timeoutOpenDelay = setTimeout( "SubNavEventInActiveOpen('" + id + "')", 150 );
}
function SubNavEventInActiveOpen( src )
{
    var obj = getRawObject( src );
	src = $j('#' + src);
	if (src == undefined)
	{
	    return;
	}
	var id = src.attr("id");
	var link = $j('#' + id + 'link') ; 
	var content = $j('#' + id + 'content') ; 
	var carrot = $j('#' + id + 'carrot') ; 
	if( m_timeoutCloseDelay )
	{
		ClearSubNavTimeOut(false);
	}
	if( m_tabContentDiv != id )
	{
		if( m_tabContentDiv != null )
		{
			SubNavEventInActiveClose();
		}
		m_tabContentDiv = id;
		if( id.indexOf( "undefined" ) > -1 )
		{
			src.addClass('subnavlinkcontainernomenuselected');
		}
		else
		{
			src.addClass('subnavlinkcontainerselected');
		}
		if( link != null )
		{
			if( id.indexOf( "undefined" ) > -1 )
			{
				link.addClass("subnavlinknomenuselected");
			}
			else
			{
				link.addClass("subnavlinkselected");
			}
		    if( carrot != null )
			{
				carrot.attr("src",m_imgPfx + "/images/global/masthead/nav_down.gif");
			}
		}
		if( content != null )
		{
        try
        {
	        if( Screen.AvailableWidth < (obj.offsetLeft + (content.width() - 1 ) + 1) || m_mastheadWidth < (obj.offsetLeft + (content.width() - 1 ) + 1) )
			{
				content.css('left',obj.offsetLeft - content.width() - 1 + obj.offsetWidth);
			}
			else
			{
                content.css('left',obj.offsetLeft + "px");
			}
			content.css("top",obj.offsetTop + obj.offsetHeight - 3 + "px");
			content.css("display", "block");
			content.bgiframe();
            var flyoutdata = content.html();
		
            if (flyoutdata != null || flyoutdata != undefined)
            {
			    if( flyoutdata.indexOf("uniqueplaceholderID") == -1 )
			    {
				    try
				    {
				        var contentid = content.attr("id");
					    var contentDiv = $j('#'+ contentid );
					    if( contentDiv.html().indexOf( "name=\"" + id.substring( 3, id.length ) + "\"" ) == -1 )
					    {
						    if( contentid == "mh_myaccountcontent" )
						    {
                                contentDiv.html("<div id=\"pbarcontent\" name=\"" + id.substring( 3, id.length ) + "\" class=\"pbarcontent\"><iframe onmouseover=\"ClearSubNavTimeOut(true);\" onmouseout=\"ClearIsIframe()\" width=\"228\" id=\"myframe\" scrolling=\"auto\" frameborder=\"0\" name=\"myframe\" src=\"" + m_pbarPfx + "/pbar/ajax.aspx?~psc=myaccount\"></iframe></div>");
						    }
						    else
						    {
							    AsyncXDomainIframeCall(m_pbarPfx + "/pbar/ajax.aspx?~psc=" + id.substring( 3, id.length ),tabcontentajax);
						    }
					    }
				    }
				    catch(e)
			        {}
			    }
			}
		}
		catch(e)
			        {}
		}
	}
}
function ClearIsIframe()
{
	m_maIframe = false;
}
function ClearSubNavTimeOut(isIframe)
{
	clearTimeout( m_timeoutCloseDelay );
	m_timeoutCloseDelay = null;
	m_maIframe = isIframe;
}
function ClearSubNavOpenTimeOut()
{
	clearTimeout( m_timeoutOpenDelay );
	m_timeoutOpenDelay = null;
}
function SubNavEventInActive( src )
{
	ClearSubNavOpenTimeOut();
	if( !m_timeoutCloseDelay )
	{
		m_timeoutCloseDelay = setTimeout( "SubNavEventInActiveClose()",500 );
	}
}
function SubNavEventInActiveClose()
{
	if( m_tabContentDiv && !m_maIframe )
	{
		var src = getRawObject( m_tabContentDiv );
		if( src )
		{
			var link = getRawObject( m_tabContentDiv + "link" );
			var content = getRawObject( m_tabContentDiv + "content" );
			var carrot = getRawObject( m_tabContentDiv + "carrot" );
			if( src.className == "subnavlinkcontainerselected" )
			{
				src.className = "subnavlinkcontainer";
			}
			else
			{
				src.className = "subnavlinkcontainernomenu";
			}
			if( link != null )
			{
				if( link.className == "subnavlinkselected" )
				{
					link.className = "subnavlink";
				}
				else
				{
					link.className = "subnavlinknomenu";
				}
				if( carrot != null )
				{
					carrot.src = m_imgPfx + "/images/global/masthead/nav_down.gif";
				}
			}
			if( content != null )
			{
				content.style.display = "none";
			}
			m_tabContentDiv = null;
		}
	}
}
function renderSubNavLinks(segmentTitle)
{
	var pwidth = (m_subNavLinkWidth != null) ? ("style=\"width:" + m_subNavLinkWidth + "px;\"") : "";
	if( pwidth != null && pwidth.length > 0 )
	{
		document.write( "<div " + pwidth + "><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" height=\"22\" align=\"right\"><tr>" );
	}
	else
	{
		document.write( "<div style=\"width:" + ((Screen.AvailableWidth > m_mastheadWidth) ? "100%" : "728px") + ";\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" height=\"22\" align=\"right\"><tr>" );
	}
	for( var n = 0; n < m_pnlinks.length; n++ )
	{
		if( n > 0 )
		{
			document.write( "<td ><img src=\"" + m_imgPfx + "/images/global/masthead/secondary_sep.gif\" alt=\"\"></td>" );
		}
		var href = m_pnlinks[n].Href;
		var icon = m_pnlinks[n].Icon;
		if( icon && m_subNavIconsDisplay )
		{
			document.write( "<td valign=\"middle\"><a href=\"" + href + "\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/" + icon + ".gif\" border=\"0\" alt=\"\"></a></td>" );
		}
		document.write( "<td align=\"right\" valign=\"middle\" nowrap=\"true\"><a class=\"lnk_crumb\" href=\"" + href + "\">" + m_pnlinks[n].Text + "</a></td>" );
	}
	document.write( "<td>&nbsp;</td>" );
	document.write( "</tr></table></div>" );
}
function renderLanguageToggle()
{
	document.write( "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" height=\"10\" align=\"right\"><tr>" );
	document.write( "<td align=\"left\" valign=\"middle\"><a href=\"" + m_langSelectorUrl + "\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/" + m_langSelectorIcon + ".gif\" border=\"0\" alt=\"\"></a></td>" );
	document.write( "<td align=\"left\" valign=\"middle\" nowrap=\"true\"><a class=\"lnk_crumb\" href=\"" + m_langSelectorUrl + "\">" + m_langSelectorCaption + "</a></td>" );
	document.write( "</tr></table>" );
}
function renderMastheadCrumbs( footer )
{
	document.write( "<div class=\"para_crumb_43\"" );
	if ( !footer )
	{
		document.write( "style=\"padding-bottom:4px;padding-top:1px;\"" );
	}
	document.write( ">" );
	document.write("<span style=\"font-weight:bold;\">" + getYouAreHere() + ":&nbsp;</span>" );
	if( typeof(flag) != "undefined" && flag != null && flag.length > 0 )
	{
		document.write( "&nbsp;<img src=\"" + m_imgPfx + "/images/global/masthead/smlflags/" + flag + ".gif\" alt=\"\" border=\"0\" />&nbsp;&nbsp;");
	}
	for( var n = 0; n < m_crumbs.length ; n++ )
	{
		if( n > 0 )
		{
			document.write( "&nbsp;&gt;&nbsp;" );
		}
		href = m_crumbs[n].Href;
		var closeGif = "";
		if ( m_crumbs[n].IsFilter)
		{
			closeGif = "<img style=\"padding-left:3px\" src=\"" + m_imgPfx + "/images/global/brand/icons/close.gif\" alt=\"removefilter\" border=\"0\"/>&nbsp;";
		}
		if( href )
		{
			document.write( "<a class=\"lnk_crumb43\" href=\"" + href + "\">" + m_crumbs[n].Text + closeGif + "</a>" );
		}
		else
		{
			document.write( "<span class=\"crumbsel43\">" + m_crumbs[n].Text + "</span>" );
		}
	}
	document.write( "</div>" );
}
function renderMastheadCrumbsRtl( footer )
{
	document.write( "<div class=\"para_crumb_43\"" );
	if ( !footer )
	{
		document.write( "style=\"padding-bottom:4px;padding-top:4px;\"" );
	}
	document.write( ">" );
	document.write("<div style=\"font-weight:bold;float:right;padding-left:3px\">" + getYouAreHere() + ":" + "</div>" );
	if( typeof(flag) != "undefined" && flag != null && flag.length > 0 )
	{
		document.write( "<div style=\"float:right\" ><img src=\"" + m_imgPfx + "/images/global/masthead/smlflags/" + flag + ".gif\" alt=\"\" border=\"0\" /></div>");
	}
	for( var n = 0; n < m_crumbs.length ; n++ )
	{
		if( n > 0 )
		{
			document.write("<div style=\"float:right; padding-right:3px\">")
			document.write( "&gt;" );
			document.write("</div>")
		}
		href = m_crumbs[n].Href;
		var closeGif = "";
		if ( m_crumbs[n].IsFilter)
		{
			closeGif = "<img style=\"padding-left:3px\" src=\"" + m_imgPfx + "/images/global/brand/icons/close.gif\" alt=\"removefilter\" border=\"0\"/>&nbsp;";
		}
		if( href )
		{
			document.write("<div style=\"float:right;padding-right:3px\" >");
			document.write( "<a class=\"lnk_crumb43\" href=\"" + href + "\">" + closeGif + m_crumbs[n].Text + "</a>" );
			document.write("</div>");
		}
		else
		{
			document.write( "<div style=\"float:right;padding-right:3px\" class=\"crumbsel43\">" + m_crumbs[n].Text + "</div>" );
		}
	}
	document.write( "</div>" );
}
function renderFooterCrumbs()
{
	//document.write( "<table width=\"" + m_mastheadWidth + "\" cellspacing=\"0\" style=\"padding-top:4px;padding-bottom:4px;vertical-align: middle;border-bottom: 1px inset #999999;border-top: 1px outset #999999;\" cellpading=\"0\" height=\"25\" border=\"0\"><tr><td style=\"padding-left:15px;\">" );
	document.write( "<table width=\"100%\" cellspacing=\"0\" style=\"padding-top:4px;padding-bottom:4px;vertical-align: middle;border-bottom: 1px inset #999999;border-top: 1px outset #999999;\" cellpading=\"0\" height=\"25\" border=\"0\"><tr><td style=\"padding-left:15px;\">" );
	if(m_isRtl)
	renderMastheadCrumbsRtl( true );
	else
	renderMastheadCrumbs( true );
	document.write( "</td><td align=\"right\" nowrap=\"1\">" );
	if(m_isRtl)
	renderPrintEmailLinksRtl();
	else
	renderPrintEmailLinks();
	document.write( "</td></tr></table>" );
}
function crumbWidth( crumb )
{
	var text = crumb.replace( m_crumbRegEx1, "" );
	text = text.replace( m_crumbRegEx2, " " );
	var hasUnicode = false;
	for( n = 0; n < text.length; n++ )
	{
		if( text.charCodeAt( n ) > 0x1000 )
		{
			hasUnicode = true;
			break;
		}
	}
	if( hasUnicode )
	{
		return text.length * m_avgChW;
	}
	else
	{
		if( m_largeFont )
		{
			return text.length * 8;
		}
		else
		{
			return text.length * 6;
		}
	}
}
function renderPrintEmailLinks()
{
	if( m_printLink || m_emailLink || m_helpLink )
	{
		document.write("<span style=\"padding-right:10px;\">");
		if( m_emailLink )
		{
			var m_emailsubject = document.title;
			if( typeof(m_emailSubject) != "undefined" && m_emailSubject != null && m_emailSubject.length > 0 )
			{
				m_emailsubject = m_emailSubject;
			}
			var emailUrl = "javascript:void(document.location.href=" + "'mailto:?subject=" + m_emailsubject + "&body=" + document.location.href.replace(/%26/g,'%2526').replace(/&/g,'%2526') + "')" ;
			document.write( "<span style=\"vertical-align:middle;\"><a href=\"" + emailUrl + "\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/email.gif\" border=\"0\" alt=\"" + m_emailText + "\" /></a></span>" );
			document.write( "<span class=\"para_small\" style=\"text-align:right;vertical-align:middle;white-space:nowrap;\"><a class=\"lnk_small\" href=\"" + emailUrl + "\">" + m_emailText + "</a></span>" );
		}
		if( m_printLink )
		{
			if( m_emailLink )
			{
				document.write( "<span class=\"mhSpace\">|</span>" );
			}
			document.write( "<span style=\"vertical-align:middle;\"><a href=\"" + m_printLink + "\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/print.gif\" border=\"0\" alt=\"" + getPrintableText() + "\" /></a></span>" );
			document.write( "<span class=\"para_small\" style=\"text-align:right;vertical-align:middle;white-space:nowrap;\"><a class=\"lnk_small\" href=\"" + m_printLink + "\">" + getPrintableText() + "</a></span>" );
		}
		if( m_helpLink )
		{
			if( m_emailLink )
			{
				document.write( "<span class=\"mhSpace\">|</span>" );
			}
			document.write( "<span><a href=\"" + m_helpLink + "\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/help.gif\" border=\"0\" alt=\"" + m_helpText + "\" /></a></span>" );
			document.write( "<span class=\"para_small\" style=\"text-align:right;vertical-align:middle;white-space:nowrap;\"><a class=\"lnk_small\" href=\"" + m_helpLink + "\">" + m_helpText + "</a></span>" );
		}
		document.write( "</span>" );
	}
}
function renderPrintEmailLinksRtl()
{
	if( m_printLink || m_emailLink || m_helpLink )
	{
		document.write("<div style=\"padding-right:10px;clear:both\">");
		if( m_emailLink )
		{
			var m_emailsubject = document.title;
			if( typeof(m_emailSubject) != "undefined" && m_emailSubject != null && m_emailSubject.length > 0 )
			{
				m_emailsubject = m_emailSubject;
			}
			var emailUrl = "javascript:void(document.location.href=" + "'mailto:?subject=" + m_emailsubject + "&body=" + document.location.href.replace(/%26/g,'%2526').replace(/&/g,'%2526') + "')" ;
			document.write( "<div class=\"para_small\" style=\"text-align:right;vertical-align:middle;white-space:nowrap;float:left;padding-top:5px\"><a class=\"lnk_small\" href=\"" + emailUrl + "\">" + m_emailText + "</a></div>" );
			document.write( "<div style=\"vertical-align:middle;float:left\"><a href=\"" + emailUrl + "\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/email.gif\" border=\"0\" alt=\"" + m_emailText + "\" /></a></div>" );
		}
		if( m_printLink )
		{
			if( m_emailLink )
			{
				document.write( "<div class=\"mhSpace\" style=\"float:left\" >|</div>" );
			}
			document.write( "<div class=\"para_small\" style=\"text-align:right;vertical-align:middle;white-space:nowrap;float:left;padding-top:5px\"><a style=\"valign:center\" class=\"lnk_small\" href=\"" + m_printLink + "\">" + getPrintableText() + "</a></div>" );
			document.write( "<div style=\"vertical-align:middle;float:left\"><a href=\"" + m_printLink + "\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/print.gif\" border=\"0\" alt=\"" + getPrintableText() + "\" /></a></div>" );
		}
		if( m_helpLink )
		{
			if( m_emailLink )
			{
				document.write( "<div class=\"mhSpace\">|</div>" );
			}
			document.write( "<div class=\"para_small\" style=\"text-align:right;vertical-align:middle;white-space:nowrap;float:left;padding-top:5px\"><a class=\"lnk_small\" href=\"" + m_helpLink + "\">" + m_helpText + "</a></div>" );
			document.write( "<div style=\"float:left\" ><a href=\"" + m_helpLink + "\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/help.gif\" border=\"0\" alt=\"" + m_helpText + "\" /></a></div>" );
		}
		document.write( "</div>" );
	}
}
function writeFooterStart()
{
	var width = ( m_mhFixed ? (m_mastheadWidth+"px") : "100%" );
	//document.write( "<div style=\"width:" + width + ";padding-top:10px;\">");
	document.write( "<div style=\"width:100%;padding-top:10px;\">");
	if( typeof( m_pageTheme ) != "undefined" )
	{
		if( m_pageTheme != null && m_pageTheme.length > 0 )
		{
			document.write( "<div style=\"clear:left;\"><img src=\"" )
			document.write( m_pageTheme );
			document.write( "\" border=\"0\" alt=\"\" /></div>" );
		}
	}
	if( m_crumbs )
	{
		renderFooterCrumbs();
	}
	document.write( "</div>" );
}
function writeFooterMid()
{
	var width = ( m_mhFixed ? m_mastheadWidth : "100%" );
	var sepCol = "#cccccc";
	if( m_isHome && typeof(m_localeSelector) != "undefined" )
	{
		document.write( "<table width=\"" + width + "\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ededed\">" );
		document.writeln( "<tr><td colspan=\"2\" style=\"background-color:#ffffff;border-top: 1px solid #efefef\"><div class=\"locale_selector\">" + m_localeSelector + "</div></td></tr>" );
		document.writeln( "<tr><td colspan=\"2\" ><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" border=\"0\" height=\"1\" width=\"1\" alt=\"\" /></td></tr>" );
	}
	if( !m_crumbs && !m_isHome )
	{
		document.write( "<table width=\"" + width + "\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ededed\">" );
		document.write( "<tr><td colspan=\"2\" bgcolor=\"" + sepCol + "\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" border=\"0\" height=\"1\" width=\"1\" alt=\"\" /></td></tr>" );
		document.write( "<tr><td colspan=\"2\" ><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" border=\"0\" height=\"1\" width=\"1\" alt=\"\" /></td></tr><tr><td bgcolor=\"#ffffff\" width=\"" + width + "\" valign=\"top\">" );
	}
}
function writeFooterBegin()
{
	writeFooterStart();
	writeFooterMid();
	RenderFlash();
}
function writeFooterClose()
{
}
function menuRef( id, text, href, items, target )
{
	menuRef( id, text, href, items, target, false )
}
function menuRef( id, text, href, items, target, selected )
{
	this.Id = id;
	this.Text = text;
	this.Href = mhFixupLink( href, "&~ck=mn" );
	this.IsSeparator = false;
	this.IsCaption = false;
	this.MenuItems = items;
	this.IsSelectedTab = false;
	if( selected == true )
	{
		this.IsSelectedTab = true;
	}
	this.OffDell = false;
	this.TargetHtml = m_stdEmpty;
	if( ( typeof(target) != "undefined" ) && target )
	{
		this.OffDell = ( target == "offdell" );
		this.TargetHtml = " target=\"" + target + "\"";
	}
}
function menuItem( text, href, target, icon )
{
	this.Text = text;
	this.Href = mhFixupLink( href, "&~ck=mn" );
	this.IsSeparator = false;
	this.IsCaption = false;
	this.IconUrl = icon;
	this.MenuItems = null;
	this.OffDell = false;
	this.TargetHtml = m_stdEmpty;
	if( ( typeof(target) != "undefined" ) && target )
	{
		this.OffDell = ( target == "offdell" );
		this.TargetHtml = " target=\"" + target + "\"";
	}
}
function menuCaption( text )
{
	this.Text = text;
	this.Href = null;
	this.IsSeparator = false;
	this.IsCaption = true;
	this.MenuItems = null;
}
function menuSep()
{
	this.IsSeparator = true;
	this.IsCaption = false;
}
function searchType( caption, value, selected )
{
	this.Caption = caption;
	this.Value = value;
	this.Selected = selected;
}
function addSearchType( caption, value, selected )
{
	if( !m_searchTypes )
	{
		m_searchTypes = new Array();
	}
	m_searchTypes[m_searchTypes.length] = new searchType( caption, value, selected );
}
function mhLink( text, href, icon, extra, isFilter )
{
	href = mhFixupLink( href, extra );
	this.Text = text;
	this.Href = href;
	this.Icon = icon;
	this.IsFilter = isFilter;
}
function addPnLink( text, href, icon )
{
	if( !m_pnlinks )
	{
		m_pnlinks = new Array();
	}
	m_pnlinks[m_pnlinks.length] = new mhLink( text, href, icon, "&~ck=pn" );
}
function addCrumb( text, href , isFilter )
{
	if( !m_crumbs )
	{
		m_crumbs = new Array();
	}
	m_crumbs[m_crumbs.length] = new mhLink( text, href, null, "&~ck=bt" , isFilter);
}
var delayMin = null;
var delayMax = null;
var currentID = null;
function flyoutopen( id, width )
{
	try
	{
	   
		if( currentID != id )
		{
		isbloating = true;
		var isfromaddtocart = false;
		m_id = id;
		if (id== "carttemp")
		{
		  isfromaddtocart = true;
		  id = "cart";
		 
		  if (totalcartquantity > 0 )
		  {
		      var link = document.getElementById("totalcartitems");
		      if (link != null)
		      {
		        link.innerHTML = totalcartquantity;
		      }
		  }
		}
			var link = document.getElementById( "flyout" + id + "link" );
			var body = document.getElementById( "flyout" + id + "body" );
		    var offset = document.getElementById( "flyout" + id + "offset" );
			width = offset.offsetWidth > width ? offset.offsetWidth : width;
			body.style.top = offset.offsetTop + offset.offsetHeight - 1;
			linky = getRawObject( "pbarcontainer" );
			var flyoutwidth;
			if( id == "cart" )
			{
				flyoutwidth = linky.offsetLeft + width + 21;
			}
			else
			{
				flyoutwidth = linky.offsetLeft + linky.offsetWidth - offset.offsetWidth + width + 21;
			}
			if( Screen.AvailableWidth < flyoutwidth )
			{
				body.style.width = width - 2;
				body.style.left = offset.offsetLeft - width + offset.offsetWidth;
			}
			else
			{
				body.style.width = width - 2;
				body.style.left = offset.offsetLeft;
			}
			link.className = "fo" + id + "linkmax";
			body.className = "fo" + id + "bodymax";
			body.style.overflow = "visible";
			offset.className = "fo" + id + "offsetmax";
			currentID = id;
			var ticks = new Date();
			if( m_pbarContentDiv != ("flyout" + id + "body") )
			{
				try
				{
					m_pbarContentDiv = "flyout" + id + "body";
					
					var flyoutDiv = getRawObject( m_pbarContentDiv );
					if (isfromaddtocart)
					{
					  
					  flyoutDiv.innerHTML = cartcontent;
					  m_fromAddToCart = true;
					}
					
					else
					{
					    if( flyoutDiv.innerHTML.indexOf( "name=\"" + id + "\"" ) == -1 )
					    {
						    if( m_pbarContentDiv == "flyoutmyaccountbody" )
						    {
							    flyoutDiv.innerHTML = "<div id=\"pbarcontent\" name=\"" + id + "\" class=\"pbarcontent\"><iframe onmouseout=\"javascript:flyoutmin('myaccount')\" onmouseover=\"javascript:flyoutminclear()\" width=\"228\" id=\"myframe\" scrolling=\"auto\" frameborder=\"0\" name=\"myframe\" src=\"" + m_pbarPfx + "/pbar/ajax.aspx?~psc=myaccount\"></iframe></div>"
						    }
						    else if( m_pbarContentDiv == "flyouttoolboxbody" )
						    {
                                // No ajax needed toolbox loaded from menudef
                            }
						    else
						    {
    						    ispaging  = false;
							    AsyncXDomainIframeCall(m_pbarPfx + "/pbar/ajax.aspx?~psc=" + id,pbarcontentajax);
							    
							      
						    }
					    }
					    m_fromAddToCart = false;
					}
				}
				catch(e)
			{
			//alert(e);
			
			}
			}
			
		growIt(id)
		}
		
	}
	catch(e)
{}
}

var doneGrowing = false;
var toolboxHeight = 0;
// called to initiate growing an element
function growIt(id)
{
   
    var offset = document.getElementById( "flyout" + id + "offset" );
    offset.className = "fo" + id + "offsetmax";
    
    isbloating = true;
    m_id = id;
    
    var body = getRawObject("flyout" + id + "body");
    if (body == null)
    {
      isbloated = false;
	  isbloating = false;
	  return;
    }
    body.style.height = "1px";
    body.style.overflow = "hidden";
	increment = 0;
	ContainerHeight = body.scrollHeight;
	toolboxHeight = body.scrollHeight;
    doneGrowing = false;
    doGrow(body);
    $j("#flyout"+id+"body").bgiframe();
}

// inner loop for growing an object
function doGrow(body)
{
    if( body.id == "flyouttoolboxbody" && $j.browser.msie && parseInt($j.browser.version) == 7 )
    {
        ContainerHeight = toolboxHeight; // In IE7 not sure why but ContainerHeight is not retaining the scrollHeight set in growIt for toolbox flyout so added this hack for now
    }
    try
    {
            if (ContainerHeight-increment >= 15)
            {
                if (increment<ContainerHeight)
	            {
	                increment=increment+15;
    	            body.style.height = increment + "px";
	                intShow = setTimeout(function(){doGrow(body)}, 0);
	            }
	            else
	            {
	                doneGrowing = true;
	            }
	        }
	        else if (ContainerHeight-increment > 0)
	        {
	            var diff = ContainerHeight - increment;
	            increment = increment + diff;
	            body.style.height = increment + "px";
	            intShow = setTimeout(function(){doGrow(body)}, 0);
	        }
	        else
	        {
	            doneGrowing = true;	        
	        }
	        
	        if (doneGrowing == true)
	        {
	             if (m_fromAddToCart != true)
	             {
	                body.style.overflow = "visible";
	             }
	             isbloated = true;
	             isbloating = false;

	             window.clearTimeout(intShow);
	             doneGrowing == false;
	        }
	     
	    
	}
	catch(e)
	{
	
	}
	
}

var doneShrinking = false;

// called to initiate shrinking an element
function shrinkIt(id,clear)
{


    if (isbloated)
    {
        
        if (!isclosing)
        {
            
            ContainerHeight = increment;
            if (ispaging == true)
            {
             var body = getRawObject("flyout" + m_id + "body");
             ContainerHeight = body.scrollHeight;
            }
            if (ContainerHeight > 1 )
            {
            isclosing = true
            currentID = null;
            shrink = ContainerHeight;
            window.clearTimeout(intShow);
            
            doneShrinking = false;
            intHide = setTimeout(function(){doShrink(id , clear)}, 0);
       
            }
            else
            {
              isbloated = false;
              isbloating = false;
              isclosing = false;
	          window.clearTimeout(intHide);
	          flyoutclose(id,true);
	    
	            if (clear)
	            {
                    body.innerHTML ="<div id=\"loading\" style=\"font-family:arial;font-size:9pt;padding:10px;\">" + m_LoadingCaption + "</div>";
                }
            }
        }
    }
    else
    {
    isbloated = false;
    isbloating = false;
    }
}

var isclosing = false

// inner loop for shrinking an object
function doShrink(id , clear)
{
    var body = getRawObject("flyout" + m_id + "body");
    body.style.overflow = "hidden";
    if (shrink>10)
	{
	
	    shrink=shrink-15;

        if (shrink > 0)
        {
	        body.style.height = shrink + "px";
	        intHide = setTimeout(function(){doShrink(id, clear)}, 0)
	    }
	    else
	    {
	        doneShrinking = true;	    
	    }
	   

	}
	else
    {
        doneShrinking = true;       
	}
	
	if (doneShrinking == true)
	{
	 
        isbloated = false;
        isbloating = false;
        isclosing = false;
	    window.clearTimeout(intHide);
	    flyoutclose(m_id,true);
	    
	    if (clear)
	    {
            body.innerHTML ="<div id=\"loading\" style=\"font-family:arial;font-size:9pt;padding:10px;\">" + m_LoadingCaption + "</div>";
        }
        
	}
	
}

function flyoutclear()
{
	flyoutminclear();
}
function flyoutminclear()
{
	if( delayMin )
	{
		clearTimeout( delayMin );
		delayMin = null;
	}
}
function flyoutmaxclear()
{
	if( delayMax )
	{
		clearTimeout( delayMax );
		delayMax = null;
	}
}

var focusFound = false
function FireOnFocus(e) {

  focusFound = true;
} 

function FireOnBlur(e)
{
 focusFound = false;
}


function flyoutmin( id )
{
    if (blockcollapse == true)
    {
        return;
    }
        if (m_fromAddToCart == false)
        {
	        flyoutmaxclear();
	        //delayMin = setTimeout( "flyoutclose('" + id + "',true)", 500 );
	        if (isbloated == true)
	        {
	        
	            if (id == "myaccount")
	            {
	           
	
                try
                {
	               
    	           var myFrame = window.frames["myframe"];
    	           
    	           if (myFrame != null)
    	           {
    	          
                      var frameDoc  =  myFrame.document;
                        
                      if (frameDoc != null)
                      {
                        var emailControl = frameDoc.forms[0].email;
                        if (emailControl != null)
                        {
                            if(window.addEventListener){
                              emailControl.addEventListener("focus", FireOnFocus, false);
                              emailControl.addEventListener("blur",FireOnBlur,false);
                            }
                            else
                            {
                             emailControl.attachEvent("onfocus",FireOnFocus);
                             emailControl.attachEvent("onblur",FireOnBlur);
                            }
                        }
                        var passwordControl = frameDoc.forms[0].password;
                        if (passwordControl != null)
                        {
                            if(window.addEventListener){
                            
                            passwordControl.addEventListener("focus",FireOnFocus,false);
                            passwordControl.addEventListener("blur",FireOnBlur,false);
                            }
                            else
                            {
                            passwordControl.attachEvent("onfocus",FireOnFocus,false);
                            passwordControl.attachEvent("onblur",FireOnBlur,false);
                            }
                        }
                      }
                  }
                  }
                 catch(e)
                    {}

                    if (focusFound)
                    {
                        return
                    }
               

	            }
	        delayMin = setTimeout( "shrinkIt('" + id + "',false)", 500 );
	        }
	    }
	 
	
}



var inflyoutmax = false;

function flyoutmax( id, width )
{
       
        inflyoutmax = true;
        isaddingtocart = false;
        flyoutminclear();
        if ((isbloated == false) && (isbloating == false))
        {
	       
        	
	        if( currentID != id && currentID != null)
	        {
        	   
        	    
		        flyoutclose( currentID, false );
	        }
	        currentID = null;
	       
	        delayMax = setTimeout( "flyoutopen('" + id + "','" + width + "')", 0 );
	    }
	    else
	    {
	        if (m_fromAddToCart)
	        {
	            return;
	        }
	        if (id !=  m_id)
	        {
	            
	           
    	         shrinkIt(id,false);
        	     setTimeout( "flyoutmax('" + id + "','" + width + "')", 250 );
    	        
	        }
//	        else
//	        {
//	            isbloating = false;
//	        }
	    }
	
  
}
function flyoutclose( id, clear )
{
	try
	{
	   
		var link = document.getElementById( "flyout" + id + "link" );
		var body = document.getElementById( "flyout" + id + "body" );
		var offset = document.getElementById( "flyout" + id + "offset" );
		link.className = "fo" + id + "linkmin";
		body.className = "fo" + id + "bodymin";
		offset.className = "fo" + id + "offsetmin";
		m_pbarContentDiv = null;
		if( clear )
		{
			currentID = null;
		}
	}
	catch(e)
{}
}
function pbarstripajax( event )
{
    if( event.Status == "OK" && event.Response != "false" && event.Response.length > 0 )
	{ // OK we have the cookie set so lets get the new values for the first render
		m_pbarMA.IsAuthenticated    = getCookie("GAAuth") ? true : false;
		m_pbarMA.IsCookied          = getCookie("chm:TP") ? true : false;
		m_pbarMA.FirstName          = m_pbarMA.IsCookied ? getCookieKeyValue( "chm:TP", "fn", true ) : m_pbarMA.FirstName;
	    renderPbarStrip();
	}
}
function pbarnavajax( event )
{

	if( event.Status = "OK" && event.Response != "false" && event.Response.length > 0 )
	{
		link = getRawObject( "subnav" );
		link.innerHTML = event.Response;
		bindMastHeadFlyouts();
	}
}
function pbarcontentajax( event )
{
    if( event.Status = "OK" && m_pbarContentDiv && event.Response != "false" && event.Response.length > 0 )
    {
       if (m_id == "cart")
       {
        link = getRawObject( m_pbarContentDiv );
	    link.innerHTML = event.Response;
	  
        
	    try
	    {
	        var divs = link.getElementsByTagName( "div" );
	        for( var i = 0; i < divs.length; i++ )
	        {
	            if( divs[i].className == "productImage" )
	            {
	                var imgUrl = divs[i].getElementsByTagName("img")[0].src;
	                var pos  = imgUrl.indexOf( "op=" );
	                if( pos > -1 )
	                {
	                    var imageID = imgUrl.substring( pos+3, imgUrl.length );
	                    divs[i].getElementsByTagName("img")[0].src = "http://accessories.us.dell.com/sna/images/products/thumbnail/" + imageID + ".jpg";
	                    "http://accessories.us.dell.com/sna/images2/resize.aspx/"+ imageID;
	                }
	            }
	            
	            if (divs[i].className == "productDesc")
	            {
	            
	                var proddiv = divs[i];

	                var dspan = proddiv.getElementsByTagName("span")[1];

	                if (dspan.innerHTML == "0.00")
	                {
                   
                    dspan.style.display = "none";
                    var zeroDisc = new String( proddiv.innerHTML.replace(/<BR>/i,""));
                    proddiv.innerHTML = zeroDisc;
	    
	                }
	            }
	        }
	    }
	    catch(ex)
	    {}
	    m_cartPages[m_cartPages.length] = link.innerHTML;
	    var cartBody  = getRawObject( m_pbarContentDiv );
	    cartBody.style.height = "1px";
	    cartBody.style.overflow = "hidden";
	    
	    cartBody.style.height = cartBody.scrollHeight;
	    ContainerHeight = cartBody.scrollHeight;

	    if (ispaging == false)
	    {
            growIt("cart")
        }
        }
       
	}

}



function tabcontentajax( event )
{
	if( event.Status = "OK" && m_tabContentDiv && event.Response != "false" && event.Response.length > 0 )
	{
		link = getRawObject( m_tabContentDiv + "content" );
		link.innerHTML = event.Response;
	}
}
var ispaging = false

function cartPaging( idx )
{
	    try
	    {
	            ispaging  = true;
		        if( typeof( m_cartPages[idx] ) != "undefined" )
		        {
			            link = getRawObject( m_pbarContentDiv );
			            link.innerHTML = m_cartPages[idx];
			            var cartBody  = getRawObject( m_pbarContentDiv );
		                cartBody.style.height = "1px";
	                    cartBody.style.overflow = "hidden";
	                    cartBody.style.height = cartBody.scrollHeight;
	                    ContainerHeight = cartBody.scrollHeight;
			           
		        }
		        else
		        {
			            var content = "cart";
			            if( m_pbarContentDiv.indexOf( "flyout" ) >= 0 )
			            {
				                content = m_pbarContentDiv.substring( 6, m_pbarContentDiv.indexOf( "body" ) );
			            }
			            if( m_pbarContentDiv.indexOf( "mh_" ) >= 0 )
			            {
				                content = m_pbarContentDiv.substring( 3, m_pbarContentDiv.indexOf( "content" ) );
			            }
			           
			            AsyncXDomainIframeCall(m_pbarPfx + "/pbar/ajax.aspx?~psc=" + content + "&~cix=" + idx,pbarcontentajax);
		        }
		        
//		        var cartBody = getRawObject( m_pbarContentDiv );
//		        alert(cartBody.scrollHeight);

	    }
	    catch(e)
    {}
}
function maLogout()
{
	for ( formIdx = 0 ; formIdx < document.forms.length;formIdx ++ )
	{
		if ( "myaccountlogout" == document.forms[formIdx].name )
		{
			var curUrl = document.location.href;
			var logOutIdx = curUrl.indexOf ("&~myaccountlogin=true" );
			if ( logOutIdx > -1 )
			{
				document.forms[formIdx].action = curUrl.substring ( 0 , logOutIdx );
			}
			document.forms[formIdx].submit();
		}
	}
}
//function maLinkLogout()
//{
//	try
//	{
//		document.cookie = "chm:TP=" + escape( "null" ) + ";path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT;domain=.dell.com";
//		document.cookie = "Profile=" + escape( "null" ) + ";path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT;domain=.dell.com";
//		document.cookie = "GAHot=" + escape( "null" ) + ";path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT;domain=.dell.com";
//		SetCookie( "~login", "true" );
//		window.location.reload();
//	}
//	catch(e)
//{}
//}

function maLinkLogout()
{
	try
	{
		document.cookie = "chm:TP=" + escape( "null" ) + ";path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT;domain=.dell.com";
		document.cookie = "Profile=" + escape( "null" ) + ";path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT;domain=.dell.com";
		document.cookie = "GAHot=" + escape( "null" ) + ";path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT;domain=.dell.com";
		SetCookie( "~login", "true" );
	    var url = m_pbarPfx + "/pbar/login.aspx?~logout=true";
	      $j.getScript( url, logoutajax ) 
	}
	catch(e)
{}
}

function logoutajax( event )
{
window.location.reload();
}

function maLink( href )
{
	window.parent.location = href;
}
function maEnterSubmit(event)
{
	if (event && event.which == 13 || event.keyCode == 13)
	maLoginValidation();
	else
	return true;
}
function maLoginValidation()
{
	var myAccntLogin = "myaccountlogin";
	for ( formIdx = 0 ; formIdx < document.forms.length;formIdx ++ )
	{
		if ( myAccntLogin == document.forms[formIdx].name )
		{
			myAccntLogin = document.forms[formIdx];
			break;
		}
	}
	var email = myAccntLogin.email;
	var emailDiv = document.getElementById( "emailDiv" )
	var password = myAccntLogin.password;
	var passwordDiv = document.getElementById( "passwordDiv" )
	if( email.value.length != 0 && password.value.length != 0 )
	{
		var actionUrl = document.location.href;
		try
		{
			myAccntLogin.submit();
		}
		catch(e)
		{
			alert( e );
		}
	}
	else
	{
		emailDiv.style.display = "none";
		passwordDiv.style.display = "none";
	}
	if(email.value.length == 0)
	{
		emailDiv.style.display = "block";
	}
	if(password.value.length == 0)
	{
		passwordDiv.style.display = "block";
	}
	if(email.value.length == 0 || password.value.length == 0 )
	{
		try
		{
	
			window.parent.setMAIframeHeight(document.getElementById("myaccountpage").offsetHeight);
		}
		catch(e)
	{}
	}
}
function renderToolBox()
{		            			   
    if( m_toolBoxLinks != undefined )
    {
        try{ document.write( m_toolBoxLinks.Render() ); }
        catch(ex){alert(ex);}
    }
}
function renderPbarStrip()
{
	    var strip = getRawObject( "pbarstripcontainer" );
	    var content;
	    if( m_pbarStripContent )
	    {
		        strip.innerHTML = m_pbarStripContent;
	    }
	    else
	    {
		        if( m_pbarCart != undefined || m_pbarMA != undefined || m_toolBoxLinks != undefined )
		        {
			            content = "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>";

			            if( m_toolBoxLinks != undefined && (m_pbarCart != undefined || m_pbarMA != undefined) )
			            {
				            content += "<td valign=\"middle\"><div id=\"flyoutdivide\" class=\"fodivide\"><img src=\"" + m_imgPfx + "/images/global/masthead/flyoutdivide.gif\" width=\"1\" alt=\"\" border=\"0\" /></div></td>";
			            }
			            if( m_pbarCart != undefined )
			            {
				            try{ content += m_pbarCart.Render(); }
			                catch(ex){alert(ex);}
			            }
			            if( m_pbarMA != undefined && m_pbarCart != undefined )
			            {
				            content += "<td valign=\"middle\"><div id=\"flyoutdivide\" class=\"fodivide\"><img src=\"" + m_imgPfx + "/images/global/masthead/flyoutdivide.gif\" width=\"1\" alt=\"\" border=\"0\" /></div></td>";
			            }
			            if( m_pbarMA != undefined )
			            {
			                try{ content += m_pbarMA.Render(); }
			                catch(ex){alert(ex);}
			            }
			            if( m_pbarLinks != undefined )
			            {
				            content += "<td valign=\"middle\"><div id=\"flyoutdivide\" class=\"fodivide\" style=\"padding:0px 7px 0px 0px;\"><img src=\"" + m_imgPfx + "/images/global/masthead/flyoutdivide.gif\" width=\"1\" alt=\"\" border=\"0\" /></div></td>";
			            }
			            content += "</tr></table>";
			            strip.innerHTML = content;
		        }
	    }
}

function ToolBox( caption, menuItems, width, iconUrl)
{
	    this.Caption            = caption;
	    this.MenuItems          = menuItems;
	    this.IconUrl            = iconUrl;
	    this.Width              = width;
	    this.Render             = ToolBoxRender;
}
function ToolBoxRender()
{
	    var nav;
	    m_LoadingCaption = this.LoadingCaption;
	    nav = "<td valign=\"top\"><div id=\"flyouttoolboxlink\" class=\"fotoolboxlinkmin\" onmouseout=\"javascript:flyoutmin('toolbox')\" onmouseover=\"javascript:flyoutmax('toolbox', " + this.Width + ")\" >"
	    + "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>";
	    var icon = this.IconUrl;
	    if( icon != undefined && icon != null && icon.length > 0 && icon.indexOf( ".com/" ) != -1 )
	    {
		    icon = m_imgPfx + icon.substring( icon.indexOf( ".com/" ) + 4 );
	        nav += "<td valign=\"top\"><img src=\"" + icon + "\" class=\"pbaricon\" alt=\"\" border=\"0\" /></td>";
	    }
	    nav += "<td nowrap=\"true\" class=\"para_small\"><span style=\"font-weight:bold;color:#0066cc;\">" + this.Caption + "</span></td></tr></table></div><div id=\"flyouttoolboxoffset\" class=\"fotoolboxoffsetmin\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" height=\"1\" /></div>"
	    + "<div style=\"width:" + this.Width + "px;\" id=\"flyouttoolboxbody\" name=\"flyouttoolboxbody\" class=\"fotoolboxbodymin\" onmouseout=\"javascript:flyoutmin('toolbox')\" onmouseover=\"javascript:flyoutclear()\"><div style=\"padding:10px;\">";
	    if( this.MenuItems != null && this.MenuItems.length > 0 )
	    {
            for( var i = 0; i < this.MenuItems.length; i++ )
            {
                if( this.MenuItems[i].IsSeparator )
                {
                    nav += "<div class=\"toolbox_divide\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" height=\"5\" /></div>";
                }
                else if( this.MenuItems[i].IsCaption )
                {
                    nav += "<div class=\"toolbox_caption\">" + this.MenuItems[i].Text + "</div>";
                }
                else
                {
                    if( this.MenuItems[i].MenuItems != null && this.MenuItems[i].MenuItems.length > 0 )
                    {
                        // Expand +/- Link
                        nav += "<a href=\"#\" onclick=\"toolBoxToggle('" + i + "', event||window.event);\"><div id=\"tnav_" + i + "\" class=\"toolbox_link_expand\">" + this.MenuItems[i].Text + "</div></a><div id=\"tnav_" + i + "_sub\" style=\"display:none;\">";
                        for( var s = 0; s < this.MenuItems[i].MenuItems.length; s++ )
                        {
                            // No icon sub links
                            nav += "<a  href=\"" + this.MenuItems[i].MenuItems[s].Href + "\"" + this.MenuItems[i].MenuItems[s].TargetHtml + "\"><div class=\"toolbox_link_sub\">" + this.MenuItems[i].MenuItems[s].Text;
                            if( this.MenuItems[i].MenuItems[s].OffDell )
							{
								nav += m_stdOffImg;
							}
							nav += "</div></a>";
                        }
                        nav += "</div>";
                    }
                    else
                    {
                        // Normal Arrow Link
                        nav += "<a  href=\"" + this.MenuItems[i].Href + "\"" + this.MenuItems[i].TargetHtml + "\"><div class=\"toolbox_link\">" + this.MenuItems[i].Text;
                        if( this.MenuItems[i].OffDell )
						{
							nav += m_stdOffImg;
						}
                        nav += "</div></a>";
                    }
                }
            }
        }
	    nav += "</div></div></td>";
	    return nav;
}

function toolBoxToggle( id, e )
{
    if(e.preventDefault)
        e.preventDefault();
    else
        e.returnValue = false;

    var nav = document.getElementById( "tnav_" + id );
    var subnav = document.getElementById( "tnav_" + id + "_sub" );
    if( subnav.style.display == "none" )
    {
        nav.className = "toolbox_link_collapse";
        subnav.style.display = "inline";
    }
    else
    {
        nav.className = "toolbox_link_expand";
        subnav.style.display = "none";
    }
    var body = getRawObject("flyouttoolboxbody");
    body.style.height = "1px";
    if(!$j.browser.msie){ body.style.overflow = "hidden"};
    body.style.height = body.scrollHeight;
	ContainerHeight = body.scrollHeight;
}
function PbarCartStrip( caption, link, items, load, count, flyout)
{
	    this.Caption            = caption;
	    this.Link               = link;
	    this.ItemsCaption       = items;
	    this.LoadingCaption     = load;
	    this.Count              = count;
	    this.IsFlyout           = flyout;
	    this.Render             = PbarCartStripRender;
}
function PbarCartStripRender()
{
	    var content;
	    m_LoadingCaption = this.LoadingCaption;
	    content = "<td valign=\"top\"><div id=\"flyoutcartlink\" class=\"focartlinkmin\" " + (this.IsFlyout ? "onmouseout=\"javascript:flyoutmin('cart')\" onmouseover=\"javascript:flyoutmax('cart', 250)\"" : "") + ">"
	    + "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td valign=\"top\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/cart.gif\" class=\"pbaricon\" alt=\"\" border=\"0\" /></td><td nowrap=\"true\" class=\"para_small\"><span style=\"font-weight:bold;color:#0066cc;\">" + (((this.Link == null) || this.IsFlyout) ? "" : "<a style=\"font-weight:bold;\" href=\"" + this.Link + "\" >" ) + this.Caption + "</a></span>" + ((this.Count > 0) && (this.IsFlyout || (this.Link != null)) ? ("<span style=\"font-weight:bold;color:blue;\">: </span> <span id=\"totalcartitems\">" + this.Count + "</span> " + this.ItemsCaption) : "") + "</td></tr></table></div><div id=\"flyoutcartoffset\" class=\"focartoffsetmin\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" height=\"1\" /></div>"
	    + "<div style=\"width:250px;\" id=\"flyoutcartbody\" name=\"flyoutcartbody\" class=\"focartbodymin\" onmouseout=\"javascript:flyoutmin('cart')\" onmouseover=\"javascript:flyoutclear()\"><div id=\"loading\" style=\"font-family:arial;font-size:9pt;padding:10px;\">" + this.LoadingCaption + "</div></div></td>";
	    return content;
}
var m_LoadingCaption = "Loading"
function PbarMAStrip( captionCookied, captionAuth, captionUnauth, clearUser, auth, cookied, fname, lname, load, flyout, modaltitle)
{
	    this.IsAuthenticated    = auth;
	    this.IsCookied          = cookied;
	    this.FirstName          = fname;
	    this.LastName           = lname;
	    this.CaptionClearUser   = "<a href=\"javascript:maLinkLogout();\" class=\"para_small\" style=\"font-weight:normal;\" target=\"_self\">" + clearUser + "</a>";
	    this.CaptionCookied     = captionCookied;
	    this.CaptionAuth        = captionAuth;
	    this.CaptionUnauth      = captionUnauth;
	    this.LoadingCaption     = load;
	    this.IsFlyout           = flyout;
	    this.ModalTitle         = modaltitle;
	    this.Render             = PbarMAStripRender;
}
function PbarMAStripRender()
{
	    var content;
	    content = "<td valign=\"top\">";
	    if( this.IsAuthenticated && this.FirstName != null && this.FirstName.length > 0)
        {
            this.CaptionAuth = this.CaptionAuth.replace( /{clearuser}/g, this.CaptionClearUser ).replace( /{fname}/g , this.FirstName ).replace( /{lname}/g , this.LastName );
            var myacctcaption = (!this.IsFlyout && m_myAccountLink != null) ? ("<a href=\"" + m_myAccountLink + "\">" + this.CaptionAuth + "</a>") : this.CaptionAuth ;
            content += "<div id=\"flyoutmyaccountlink\" class=\"fomyaccountlinkmin\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td nowrap=\"true\" class=\"para_small\">" + myacctcaption + "</td></tr></table></div><div id=\"flyoutmyaccountoffset\" class=\"fomyaccountoffsetmin\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" height=\"1\" /></div>";
        }
        else if( this.IsCookied && this.FirstName != null && this.FirstName.length > 0)
        {
            this.CaptionCookied = this.CaptionCookied.replace( /{clearuser}/g, this.CaptionClearUser ).replace( /{fname}/g , this.FirstName ).replace( /{lname}/g , this.LastName );
            var myacctcaption = (!this.IsFlyout && m_myAccountLink != null) ? ("<a href=\"" + m_myAccountLink + "\">" + this.CaptionCookied + "</a>") : this.CaptionCookied ;
            content += "<div id=\"flyoutmyaccountlink\" class=\"fomyaccountlinkmin\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td nowrap=\"true\" class=\"para_small\">" + myacctcaption + "</td></tr></table></div><div id=\"flyoutmyaccountoffset\" class=\"fomyaccountoffsetmin\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" height=\"1\" /></div>";
        }
        else
        {
            content += "<div id=\"flyoutmyaccountlink\" class=\"fomyaccountlinkmin\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td valign=\"top\"><img src=\"" + m_imgPfx + "/images/global/brand/icons/profile.gif\" class=\"pbaricon\" alt=\"My Account\" border=\"0\" /></td><td nowrap=\"true\" class=\"para_small\"><span style=\"color:#0066cc\"><a href=\"#\" onclick=\"stormModal.showLogin({title:'"+ this.ModalTitle +"',authLevel:3});\">" + this.CaptionUnauth + "</a></span></td></tr></table></div><div id=\"flyoutmyaccountoffset\" class=\"fomyaccountoffsetmin\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" height=\"1\" /></div>";
        }
	    content += "<div style=\"width:250px;\" id=\"flyoutmyaccountbody\" class=\"fomyaccountbodymin\"><div id=\"loading\" style=\"font-family:arial;font-size:9pt;padding:10px;\">" + this.LoadingCaption + "</div></div></td>";
	    return content;
}




function ClientVars()
{
	this.Bandwidth = Bandwidth();
	this.FlashVersion = SetFlashVersion();
	var bw = getCookieKeyValue( "ClientVars", "bandwidth" );
	if( bw == null || bw.length == 0 )
	{
		SetClientVar( "bandwidth", this.Bandwidth );
	}
	var fv = getCookieKeyValue( "ClientVars", "flashversion" );
	if( fv == null || fv.length == 0 )
	{
		SetClientVar( "flashversion", this.FlashVersion );
	}
}
function SetFlashVersion()
{
	var flashversion = 0;
	var MSDetect = false;
	if (navigator.plugins && navigator.plugins.length)
	{
		x = navigator.plugins["Shockwave Flash"];
		if (x)
		{
			if (x.description)
			{
				y = x.description;
				return y.charAt(y.indexOf('.')-1);
			}
		}
		if (navigator.plugins["Shockwave Flash 2.0"])
		{
			return 2;
		}
	}
	else
	{
		MSDetect = true;
	}
	if( MSDetect )
	{
		var vs = 0;
		for( v=2;v<15;v++ )
		{
			ieFlashObj = null;
			window.execScript('on error resume next: ieFlashObj = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + v + '"))','VBScript');
			if( ieFlashObj )
			{
				vs = v;
			}
		}
		return vs;
	}
	return 0;
}
var isReady = false;
function sReady()
{
    $j(document).ready (
        function (){isReady = true; $j(document).triggerHandler( 'sReady');}
    );
    arpanisthedevil();
}
function addsReady ( fn )
{
    jQuery(document).bind ( 'sReady' , fn);
}

function arpanisthedevil ()
{   
    if ( m_isPopupIntention )
    {
        try{
       jQuery.each(document.body.childNodes, function(i, val) {
        if ( $j(val).is('table'))$j(val).css('width','100%');
        });
        }
        catch(e){}
    }  
}
function getObjectHeight(obj)
{
	return  $j(obj).height();
}
function getObjectsByTag(tag)
{
	if( document.getElementsByTagName )
	{
		return document.getElementsByTagName(tag);
	}
	else if( document.all )
	{
		return document.all.tags(tag);
	}
	return null;
}
function setMAIframeHeight(height)
{
	try
	{
		var myframes = ParseIFrameObjects( "myframe" );
		for( var frameidx = 0; frameidx < myframes.length; frameidx++ )
		{
			if( height )
			{
				myframes[frameidx].style.height = height;
				ContainerHeight = height + 20;
			}
			else
			{
				myframes[frameidx].style.height = 300;
				ContainerHeight = 300;
			}
		}
	
        var body = getRawObject("flyout" + m_id + "body");
		body.style.height = ContainerHeight;

	}
	catch(e)
{}
}
var m_moreLessUlr="";
function moreLessToggle(evt)
{
	var myTarget = evt.target || evt.srcElement;
	var parent = myTarget.parentNode.parentNode;
	if ( parent.gotdata )
	{
		moreLessToggleLocal ( evt );
		return;
	}
	parent.gotdata= true;
	var dataDiv = null;
	var dataInput = null;
	for ( i = 0 ; i < parent.childNodes.length ; i ++ )
	{
		if ( parent.childNodes[i].tagName=="DIV" )
		{
			var dataInputs = parent.childNodes[i].getElementsByTagName ( "input");
			if ( dataInputs != null && dataInputs.length == 1 )
			{
				dataInput = dataInputs[0];
				dataDiv = parent.childNodes[i];
				break;
			}
		}
	}
	if ( dataDiv == null )
	{
		moreLessToggleLocal ( evt );
		return;
	}
	if ( m_moreLessUlr == null || m_moreLessUlr.length == 0 )
	{
		return;
	}
	var syncObj = getXMLHTTPObj();
	if ( syncObj == null )
	{
		moreLessToggleLocal ( evt );
		return;
	}
	m_moreLessUlr = m_moreLessUlr.replace(/\/\//,"/");
	syncObj.open("POST", m_moreLessUlr , true);
	var params = "data=" + dataInput.value;
	syncObj.setRequestHeader("Content-length", params.length);
	syncObj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	syncObj.setRequestHeader("Content-length", params.length);
	syncObj.setRequestHeader("Connection", "close");
	moreLessToggleLocal( evt );
	syncObj.onreadystatechange = function(e)
	{
		if(syncObj != undefined && syncObj.readyState == 4)
		{
			if(syncObj.status == 200)
			{
				dataDiv.innerHTML = syncObj.responseText;
			}
			else
			{
				moreLessToggleLocal( evt );
			}
		}
	}
	syncObj.send(params);
}
function moreLessToggleLocal( evt )
{
	var myTarget = evt.target || evt.srcElement;
	var DIV = "DIV"
	for(var i = 0; i < myTarget.parentNode.parentNode.childNodes.length; i++)
	{
		if(myTarget.parentNode.parentNode.childNodes[i].tagName == DIV)
		{
			if(myTarget.parentNode.parentNode.childNodes[i].className == "toggleLinks")
			{
				if(myTarget.parentNode.parentNode.childNodes[i].style.display == "none")
				{
					myTarget.parentNode.parentNode.childNodes[i].style.display ="inline";
				}
				else
				{
					myTarget.parentNode.parentNode.childNodes[i].style.display ="none";
				}
			}
		}
	}
}
function mhFixupLink( href, extra )
{
	if( typeof(extra) == "undefined" )
	{
		extra = "&~ck=mn";
	}
	if( href )
	{
		var anchor = null;
		var anchorix = href.indexOf( "#" );
		if( anchorix != -1 )
		{
			anchor = href.substr( anchorix );
			href = href.substr( 0, anchorix );
		}
		if( href.indexOf( "?" ) == -1 )
		{
			extra = "?" + extra.substr( 1 );
		}
		if( href.toLowerCase().indexOf( "javascript:" ) == -1 )
		{
			href += extra;
		}
		else
		{
			start = href.indexOf( "?" );
			if( start != -1 )
			{
				ix = href.indexOf( "\'", start );
				if( ix == -1 )
				{
					ix = href.indexOf( "\\", start );
					if( ix == -1 )
					{
						ix = href.indexOf( "\"", start );
					}
				}
				if( ix != -1 )
				{
					href = href.substr( 0, ix ) + extra + href.substr( ix );
				}
			}
		}
		if( anchor )
		{
			href += anchor;
		}
	}
	return href;
}
function getRawObject(obj)
{
	var theObj;
	if (typeof obj == "string")
	{
		if (isW3C)
		{
			theObj = document.getElementById(obj);
		}
		else if (isIE4)
		{
			theObj = document.all(obj);
		}
		else if (isNN4)
		{
			theObj = seekLayer(document, obj);
		}
		else
		{
		    theObj = document.getElementById(obj);
		}
	}
	else
	{
		theObj = obj;
	}
	return theObj;
}
function getBackto()
{
	if ( typeof ( m_backto ) != "undefined" )
	{
		return m_backto;
	}
	return "";
}
function getYouAreHere()
{
	if ( typeof ( m_youAreHere ) != "undefined" )
	{
		return m_youAreHere;
	}
	return "";
}
function getGotoTop ()
{
	if ( typeof ( m_gototop ) != "undefined" )
	{
		return m_gototop;
	}
	return "";
}
function getPrintableText ()
{
	if ( typeof ( m_printableText ) != "undefined" )
	{
		return m_printableText;
	}
	return "";
}
function addBookMark()
{
	if (window.external)
	{
		window.external.AddFavorite(document.location.href,document.title);
	}
	else
	{
		alert("Sorry, your browser doesn't support bookmarking this page...\n\nPlease try pressing Control + D instead");
	}
}
function menuGoto( url )
{
	if ( m_anchorClicked )
	{
		return;
	}
	m_anchorClicked = true;
	if ( url != null && url.indexOf( "javascript" ) > -1 )
	{
		eval ( url );
	}
	else
	{
		document.location = url;
	}
	if( document.event != null )
	{
		document.event.cancelBubble = true;
	}
	return false;
}
function menuWinOpen( url )
{
	window.open( url );
	return false;
}
m_printviewHref = document.location.href;
function printview()
{
    winopen(m_printviewHref + "&~lt=print",'print','WIDTH=648,HEIGHT=510,RESIZABLE=YES,SCROLLBARS=YES,TOOLBAR=YES,LEFT=0,TOP=20');
}
function winopen(url,stuff,morestuff)
{
	var popwin = window.open(url,stuff,morestuff);
	if( typeof(popwin) != "undefined" && popwin )
	{
		popwin.focus();
	}
	lastPopup = popwin;
}
function Bandwidth()
{
	if( readIEVer() < 5.0 || isOpera || navigator.appVersion.toLowerCase().indexOf("win") == -1 )
	{
		return "NA";
	}
	try
	{
		document.body.addBehavior ("#default#clientCaps");
		if ( typeof( document.body.connectionType) != "undefined" )
		{
			if ( document.body.connectionType == "modem" )
			{
				return "Modem";
			}
			return "Lan";
		}
	}
	catch( e )
	{
		return "NA";
	}
}
function RemoveName()
{
	var cookie = getCookie ( "StormPCookie" )
	if ( cookie && cookie.length > 0 )
	{
		cookie= StripCookieValue( cookie , "fstn" );
		cookie = StripCookieValue( cookie , "lstn");
		document.cookie = "StormPCookie=" + cookie + ";domain=.dell.com";
	}
	cookie = getCookie ( "lwp" );
	if ( cookie && cookie.length > 0 )
	{
		cookie = StripCookieValue( cookie , "fstn" );
		cookie = StripCookieValue( cookie , "lstn");
		cookie = StripCookieValue ( cookie , "fn" );
		document.cookie = "lwp=" + cookie+ ";domain=.dell.com";
	}
}
function StripCookieValue ( inVal , removeVal )
{
	if ( !inVal || inVal.length == 0 || !removeVal || removeVal.length == 0 )
	{
		return inVal;
	}
	var idx = 0;
	var ampIdx = 0;
	var semiIdx = 0;
	var len = 0;
	var repString = "";
	idx = inVal.indexOf ( removeVal );
	if ( idx > - 1)
	{
		ampIdx = inVal.indexOf ( "&" , idx );
		semiIdx = inVal.indexOf ( ";" , idx);
		len = ampIdx ;
		if ( len == -1 )
		{
			len = semiIdx;
		}
		else if ( semiIdx != -1 && semiIdx < len )
		{
			len = semiIdx;
		}
		if ( len > -1 )
		{
			repString = inVal.substring( idx , len );
		}
		else
		{
			repString = inVal.substr( idx );
		}
		return inVal.replace ( repString , "" ).replace("&&" , "&" ) ;
	}
	return inVal;
}
function getCookie(NameOfCookie)
{
	if (document.cookie.length > 0)
	{
		begin = document.cookie.indexOf(NameOfCookie+"=");
		if (begin != -1)
		{
			begin += NameOfCookie.length + 1;
			end = document.cookie.indexOf(";", begin);
			if (end == -1)
			{
				end = document.cookie.length;
			}
			return unescape( document.cookie.substring(begin, end));
		}
	}
	return "";
}
function SetCookie (NameOfCookie , value)
{
	document.cookie = NameOfCookie + "=" + escape( value ) + ";path=/;domain=dell.com;";
}
function AutoSubmit ( frm )
{
	var cookieVal = getCookie ( "autosubmit" );
	if ( cookieVal == document.location )
	{
		var submitForm = window.confirm ( "Resubmit form?");
		if ( submitForm )
		{
			frm.submit();
			return;
		}
		else
		{
			return;
		}
	}
	SetCookie( "autosubmit" , document.location );
	frm.submit();
}
function AutoSubmit2 ( frm, url, freq )
{
	var oldAction = frm.action;
	frm.action = url;
	var cookieVal = getCookie ( "autosubmit" );
	if ( cookieVal == document.location )
	{
		var submitForm = window.confirm ( "Resubmit form?");
		if ( submitForm )
		{
			if( freq == "true" )
			{
				frm.target = "FreqFormPopup";
				var x = window.open( url, "FreqFormPopup", "width=600, height=400, location=yes, menubar=yes, status=yes, toolbar=yes, scrollbars=yes, resizable=yes" );
			}
			frm.submit();
			frm.target = "_self";
			frm.action = oldAction;
			return;
		}
		else
		{
			return;
		}
	}
	SetCookie( "autosubmit" , document.location );
	if( freq == "true" )
	{
		frm.target = "FreqFormPopup";
		var x = window.open( url, "FreqFormPopup", "width=600, height=400, location=yes, menubar=yes, status=yes, toolbar=yes, scrollbars=yes, resizable=yes" );
	}
	frm.submit();
	frm.target = "_self";
	frm.action = oldAction;
}
function singlechoiceskiplevel( formInput )
{
	if( typeof(formInput) != "undefined" )
	{
		var i = 0;
		var displayDiv = null;
		while ( i < formInput.length )
		{
			if( formInput[i].value != null && formInput[i].value != "")
			{
				if( document.getElementById(formInput[i].value) != null )
				{
					if( formInput[i].selected || formInput[i].checked )
					{
						document.getElementById(formInput[i].value).style.display = "inline";
						displayDiv = formInput[i].value;
					}
					else
					{
					    if( displayDiv != formInput[i].value )
					    {
						    document.getElementById(formInput[i].value).style.display = "none";
						}
					}
				}
			}
			i++;
		}
	}
}
function FlashLibraryActivate(swfFile,width,height,bgcolor,ver,altFormat,params,movieName){
	var t = this;
	var activeX = false;
	t.ieAutoInstall = false;
	t.hasVersion = function(ver){
		t.swf = false;
		if(!ver) ver = 0;
		var n = navigator;
		if(n.plugins && n.plugins.length > 0){
			var m,tp,d,v;
			m = n.mimeTypes;
			tp = 'application/x-shockwave-flash';
			if(m && m[tp] && m[tp].enabledPlugin && m[tp].enabledPlugin.description){
				d = m[tp].enabledPlugin.description;
				v = d.charAt(d.indexOf('.')-1);
				t.swf = (v >= ver) ? true : false;
			}
		}else if(n.appVersion.indexOf("Mac") == -1 && window.execScript){
			ieFlashObj = null;
			activeX = true;
			for(var i=ver; i<=10&&i!=1&& ieFlashObj!=true; i++){
				execScript('on error resume next: ieFlashObj=IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash'+((i==0)?'':'.'+i)+'"))','VBScript');
				if ( ieFlashObj == true )
				{
					t.swf = true;
					break;
				}
			}
		}else{
			t.swf = false;
		}
		return t.swf;
	}
	t.getPluginTag = function(){
		var fixedVer = "";
		if( ver == 7)
		{
			fixedVer = "7,0,0,0";
		}
		else if( ver > 7 )
		{
			fixedVer = "8,0,0,0";
		}
		else
		{
			fixedVer = "6,0,21,0";
		}
		var cmHack= swfFile.indexOf ( "cmhack" )> -1;
		if ( cmHack )
		{
			if ( document.location.href.indexOf ( "~bandwidth=Modem" ) == -1 && !t.hasVersion(ver))
			{
				document.location.href = document.location.href + "&~bandwidth=Modem";
			}
		}
		if ( swfFile.indexOf ( "autoinstall" ) > -1 )
		{
			t.ieAutoInstall = true;
		}
		params = " " + params + " ";
		var s = '';
		var win = (navigator.appVersion.toLowerCase().indexOf("win")!=-1);
		var ie = (navigator.appName=="Microsoft Internet Explorer");
		if(t.hasVersion(ver) && swfFile || win && ie && swfFile && t.ieAutoInstall){
			var additionalParams = '';
			var qPos = swfFile.indexOf ( "?" )
			if ( qPos > -1 && qPos + 1 < swfFile.length && ver == 6 )
			{
				var ta = 'FlashVars';
				var v = swfFile.substring ( qPos + 1 );
				swfFile = swfFile.substring ( 0 , qPos );
				additionalParams += (activeX)?'\t<param name="' + ta + '" value="' + v + '" />\n': ' '+ ta + '="' + v + '"';
			}
			var hasQuestionMark = swfFile.indexOf( "?" );
			if( hasQuestionMark > -1 )
			{
				swfFile +="&containerURL=" + encodeURIComponent( location.href );
				swfFile +="&id=" + movieName;
			}
			else
			{
				swfFile +="?containerURL=" + encodeURIComponent( location.href );
				swfFile +="&id=" + movieName;
			}
			if(activeX){
				s = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + fixedVer + '" id="'+movieName+'" width="'+width+'" height="'+height+'">\n';
				s += '\t<param name="movie" value="'+swfFile+'" />\n';
				s += '\t<param name="allowFullScreen" value="true" />\n';
				s += '\t<param name="quality" value="high" />\n';
				s += '\t<param name="menu" value="true" />\n';
				s += '\t<param name="wmode" value="opaque" />\n';
				s += '\t<param name="allowScriptAccess" value="always">\n';
				s += '\t<param name="bgcolor" value="'+bgcolor+'" />\n';
				s += additionalParams;
				s += params;
				s += altFormat;
				s += '</object>\n\n';
				return s;
			}else{
				s = '<embed src="'+swfFile+'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" allowScriptAccess="always" wmode="opaque" allowFullScreen="true" type="application/x-shockwave-flash" name="'+movieName+'" id="'+movieName+'" width="'+width+'" height="'+height+'" bgcolor="'+bgcolor+'"'+additionalParams+params+'></embed>\n';
				return s;
			}
		}else{
			return altFormat;
		}
	}
}

function resizeFlash( w, h, id )
{
	var flash = document.getElementById( id );
	if( flash == null )
	{
		var flash = document.getElementByName( id );
	}
	if( !isNaN( w ) ) flash.width = w;
	if( !isNaN( h ) ) flash.height = h;
	return id
}
			
function RenderFlash()
{
	var flashObjects = ParseDivObjects( "flashContentDiv" );
	var flashObject;
	for( var flashIdx = 0; flashIdx < flashObjects.length; flashIdx++ )
	{
	    var jscriptTxt  = flashObjects[flashIdx].innerHTML;
	    if ( jscriptTxt.indexOf("new FlashLibraryActivate") > -1 )
	    {
	        try
	        {
	            var flashObj = eval(jscriptTxt);
		        flashObjects[flashIdx].innerHTML = flashObj.getPluginTag();
		    }
		    catch(e){}
	    }
	}
}
function rgcInit ()
{
    return;
}


function stormModalObj()
{
    this.Inited= false;
}

stormModalObj.prototype.init = function ()
{
   if ( this.Inited )
   {
        return;
   }
   
   var standardModel = '<div class="jqmWindow" id="standardModel"><div class="jqmWinHeader jqDrag" ><div class="jqmClose" onclick="stormModal.close()"><image src="' + m_imgPfx + '/images/modal_close_btn.gif" border="0" /></div><div class="jqmWinTitle"></div></div><div class="jqmContent"></div><div class="jqmFooter"><div class="jqmFooterButtons"></div><div class="jqmFooterStatus"></div></div></div>';
   $j(standardModel).appendTo('body');
   
   $j('#standardModel').jqm( );
   this.InternalModal= $j('#standardModel') ;
   this.DefaultProps = { defaultTitle: "&nbsp;"  , width : this.InternalModal.width() };
   this.AbsoluteHeight = 0;
   this.Title  = this.InternalModal.find( '.jqmWinTitle');
   this.Footer  = this.InternalModal.find( '.jqmFooter');
   this.FooterStatus  = this.Footer.find( '.jqmFooterStatus');
   this.FooterButtons  = this.Footer.find( '.jqmFooterButtons');
   
   this.Content = this.InternalModal.find( '.jqmContent');
   this.DummbyAnchor = $j('<div href=foo  ><div>');
   this.Inited=true;
}
stormModalObj.prototype.addclick = function ( t )
{
    t.each  ( function (){ 
        
        $j(this).click ( function ()
            { 
            var map= {};
            map.href = $j(this).attr ('href');
            stormModal.show ( map );
            $j(this).blur();
	        return false;
            }
        )}
        );
}
stormModalObj.prototype.loginRequired = function (  map )
{

    if ( map.authLevel   && map.authLevel > _curAuthLevel )
    {
        return true;
    }
    return false;
   
}

stormModalObj.prototype.ResetHref = function ( map  )
{
    if ( map.elm )
    {
        $j(map.elm).attr ( 'href' , 'javascript:void(0)');
    }
}



stormModalObj.prototype.show = function ( map  , forlogin )
{

    this.init();
  
    if ( !forlogin )
    {
        this.continueMap = null;
    }
   
    if ( this.loginRequired ( map ))
    {
    
        this.ResetHref(map);
        this.continueMap = map;
        //this.showLogin ( map.authLevel, map.title );
        this.showLogin ( map );
        return;
    }
    if (map.top)
    {
        window.location.href=map.href;
        return false;
    }
    
    
    var etrig  = this.DummbyAnchor;
    etrig.attr ( 'href' , map.href );
    this.close();
    
    var mm = jQuery.extend({}, this.DefaultProps, (map ? map : {}));

    this.setprops( mm );
    
    this.InternalModal.jqmShow (  );
    
    this.loadContent ( mm );
    this.positionModal();
    this.lockModal(mm);
     $j(this).blur();
     this.ResetHref(map);
    
    
	return false;
    
}


stormModalObj.prototype.lockModal = function(map)
{
   var ol = $j(document).find('.jqmOverlay');
  
 if (map.lock)
 {
   ol.css('cursor','wait');
   ol.unbind();

 }
 else
 {
  ol.css('cursor','');

 }
}

stormModalObj.prototype.positionModal = function()
{

var scrollTop = (document.all)? ( truebody().scrollTop) : window.pageYOffset;
var scrollLeft = (document.all)? ( truebody().scrollLeft) : window.pageXOffset;
var clientHeight = (document.all)? ( truebody().clientHeight) : document.body.clientHeight;
var clientWidth = (document.all)? ( truebody().clientWidth) : document.body.clientWidth;

var elm = this.InternalModal;
var left=0, top=0;
top  = scrollTop + clientHeight/2 - elm.height()/2;
left = scrollLeft + clientWidth/2 ;

top = 50; //AJH

var cssObj = {
        left: left+"px",
        top: top+"px"
      };
elm.css(cssObj);

}

stormModalObj.prototype.loadContent = function ( map  ) 
{
    
    var r = this.Content;
    if (map.contentid)
    {
        var elmObj = $j('#' + map.contentid);
        if (elmObj)
        {
        var elmContent =  elmObj.html()
        r.html (elmContent);
        }
        return;
    }
    var processing = "<div class=\"waitcls\">" + m_processingcaption + "<img src=\""+ m_imgPfx +"/images/ajax-loader.gif\" border=\"0\"/></div>";
  
    if ( map.href.substr(0,4) == 'http' || map.iframe )
        {
            r.height( this.AbsoluteHeight -85);
          
            r.html(processing + '<iframe style="display:block" width="100%" height="100%" onload="$j(this).css ( \'display\',\'block\');$j(\'.waitcls\').css(\'display\', \'none\'); " style="height:100%" frameborder="0" hspace="0" src="' + map.href +'" />');
        }
        else
        {
            r.html ( processing );
             $j(".waitcls").css({ position:"relative"}); 
            r.height('72%');
            r.load(map.href );
        }


}

stormModalObj.prototype.showLogin =function (  map )
{
    var lvl = 3;
    if (map.authLevel)
    {
        lvl = map.authLevel;
    }
   
    if ( lvl > _curAuthLevel )
    {
        var pbarurl = m_pbarPfx;
        if (pbarurl == undefined || pbarurl.length == 0)
        {
            pbarurl = "http://pbar.us.dell.com";
        }
        var url = pbarurl  + m_login_url  +"?level="+ lvl + getLwp();
        var lwidth = 320;
        var lheight = 350;
        if (map.height)
        {
            lheight = map.height;
        }
        
        if (map.width)
        {
            lwidth = map.width;
        }
        
        var caption = "Login";
        if (map.title)
        {
            caption = map.title;
        }
        var map = { href : url , height : lheight , width : lwidth , title:caption , elm: this};
        this.show ( map , true );
       
    }
}

stormModalObj.prototype.continueAuth = function ()
{

  if ( this.continueMap ) 
    {
        var newMap = $j.extend ( {} , this.continueMap );
     
        setTimeout ( function (){stormModal.show ( newMap );} , 0);
        
    }
    else
    {
    // This is to update the pbar strip after logging in
        window.location.reload();
    }
}
stormModalObj.prototype.setprops = function (map)
{
    this.Title.html ( map.title ? map.title : map.defaultTitle );
   
    if ( map.content )
    {
        this.Content.append ( $j(map.content) ) ;
    }
    else
    {
        this.Content.empty();
    }
    
    if ( map.height )
    {
       if ( !(( map.buttons ) || (map.footerStatus)) )  {
            this.InternalModal.height( map.height );
        }
        
        this.AbsoluteHeight = map.height;       
    }
    else
    {
        this.InternalModal.css( "height","");
    }
    
    if ( map.width ) 
    {
        this.InternalModal.width ( map.width );
        this.InternalModal.css( 'margin-left' , map.width/-2);
    }
    
    this.setfooterButtons ( map.buttons );
    this.setfooterStatus (map.footerStatus );
    
}

stormModalObj.prototype.close = function ()
{
    this.init();
    this.InternalModal.jqmHide();
    
}

//stormModalObj.prototype.footer = this.Footer.html;
stormModalObj.prototype.setheader = function (e)
{
    this.init();
    return this.Title.html(e);
}

stormModalObj.prototype.setfooterButtons = function (e)
{
    this.init();
    e = e ? e : "";
    return this.FooterButtons.html(e);
}
stormModalObj.prototype.setfooterStatus = function (e)
{
    this.init();
    e = e ? e : "";
    return this.FooterStatus.html(e);
}



var _curAuthLevel = 0;

var m_login_url = "/pbar/login.aspx";

var _mwidth = 200;
var _mheight = 200;

function proccessAuthChange ( level )
{
   
    _curAuthLevel= level;
    stormModal.close();
    stormModal.continueAuth();
    
}


var stormModal = new stormModalObj();


function clientPageInit ()
{
    stormModal.addclick  ($j('a[@n_modal]'));
   

}
$j(document).ready( clientPageInit );

addsReady( InitDocumentLoad );
function InitDocumentLoad()
{
    InitClueTip();
    //CreateTrailObj();
    InitTechNotes();
}
//function CreateTrailObj()
//{
//var trailimageid = "<div id=\"trailimageid\" style=\"position:absolute;visibility:hidden;left:0px;top:0px;width:1px;height:1px;font-family:arial,helvetica;font-size:8.5pt\"><span id=\"processingCaptionID\">Processing....</span><img src=\""+ m_imgPfx +"/images/global/brand/icons/ajax-loader[1].gif\" border=\"0\"></div>";
//$j(trailimageid).appendTo('body');
//}
function getQueryVariable(variable)
{
	var query = window.location.search.substring(1);
	var vars = query.split("&");
	for (var i=0;i<vars.length;i++)
	{
		var pair = vars[i].split("=");
		if (pair[0] == variable)
		{
			return pair[1];
		}
	}
}

function GetScreen()
{
  try {
	this.Width = screen.width;
	this.Height = screen.height;
	this.AvailableWidth = screen.availWidth;
	this.AvailableHeight = screen.availHeight;
	this.ColorDepth = screen.colorDepth;
	}catch(err){
	  
	   this.Width = 1024;
	   this.Height = 768;
	   this.AvailableWidth = 1024;
	   this.AvailableHeight = 768;
	   this.ColorDepth = 0;
	}
}

function parentNode(elem)
{
    if (typeof(elem) != "undefined" && elem != null)
    {
	if( elem.parentElement )
	{
		return elem.parentElement;
	}
	if( elem.parentNode )
	{
		return elem.parentNode;
	}
	}
	return null;
}
function DecodeSearch(str)
{
    try
    {
	    return unescape(decodeURI(str).replace(/\+/g, " "));
	}
	catch(e)
	{}
}
var m_framesAdded = false;
function AddHiddenFrames ()
{
	if ( m_framesAdded )
	{
		return;
	}
	var df1 = document.getElementById( "dataiframe_0" );
	if ( df1 != null )
	{
		m_framesAdded = true;
	}
	m_framesAdded = true;
	for ( var i = 0 ; i < 10 ; i++ )
	{
		var iframeObj = document.createElement("iframe");
		iframeObj.id = "dataiframe_" + i ;
		iframeObj.style.border='0px';
		iframeObj.style.width='0px';
		iframeObj.style.height='0px';
		iframeObj.src = "javascript:false;";
		var container = getRawObject( "iframeContainer" );
		if ( container== null )
		{
		    
		    var  container = document.createElement( "div" );
            container.id = "iframeContainer";
            container.style.position = "absolute";
		    document.body.appendChild( container );
		   
		}
		
		container.appendChild( iframeObj );
	}
}
var m_dataIframes = new Array ();
var m_frameIdxs = new Array ();
var m_frameIdx = 0;
function AsyncXDomainIframeCall ( url , callback )
{
	if (!isReady)
	{
	    addsReady(function (){ AsyncXDomainIframeCall ( url , callback ) });
		return;
	}
	AddHiddenFrames();
	var iframeObj;
	for( n=0;n<m_frameIdxs.length;n++)
	{
		if( m_frameIdxs[n] == url )
		{
			iframeObj = m_dataIframes[n];
			
		}
	}
	if ( iframeObj == null )
	{
		if( m_frameIdx >= 10 )
		{
			m_frameIdx = 0;
		}
		iframeObj = document.getElementById("dataiframe_" + m_frameIdx);
		m_dataIframes[m_frameIdx]= iframeObj;
		m_frameIdxs[m_frameIdx] = url;
		m_frameIdx++;
	}
	iframeObj.onload = function (){ jasonCallback(iframeObj.id, callback);};
    iframeObj.onreadystatechange = function (){ jasonCallback(iframeObj.id, callback);};
    
	var ticks = new Date();
	var urlTime = "ts=" + ticks.getSeconds() + ticks.getMilliseconds();
	if ( url.indexOf ( "?" )== -1 )
	{
		url +="?" ;
	}
	else
	{
		url +="&";
	}
	setTimeout( "NavigateFrame( '" + iframeObj.id + "','" + (url + urlTime) + "' )", 10 );
}
function NavigateFrame (IFrameObj, URL )
{
	IFrameObj = document.getElementById(IFrameObj);
	try
	{
		if (IFrameObj.contentDocument) {
			IFrameDoc = IFrameObj.contentDocument;
		} else if (IFrameObj.contentWindow) {
			IFrameDoc = IFrameObj.contentWindow.document;
		} else if (IFrameObj.document) {
			IFrameDoc = IFrameObj.document;
		} else {
			return true;
		}
		IFrameDoc.location.replace(URL);
	}
	catch ( e )
	{
		IFrameObj.src =URL;
	}
	return false;
}
function jasonCallback (id , callback )
{
	var iframeObj = document.getElementById(id);
	if ( iframeObj.readyState =="complete" || typeof(iframeObj.readyState) == "undefined" )
	{
		try
		{
			var thingie = new Object();
			var retval = null;
			var txt = null;
			try
			{
				if (iframeObj.contentDocument)
				{
				    thingie.Node = iframeObj.contentDocument.body;
					txt = iframeObj.contentDocument.body.innerHTML;
					if ( txt == "false")
					{
					    return;
					}
				}
				else if (iframeObj.contentWindow)
				{
				    var frmDoc = null;
				    try
				    {
				        frmDoc= iframeObj.contentWindow.document
				    }
				    catch ( e )
				    {
				        return;
				    }
				    thingie.Node = frmDoc.body;
					txt = thingie.Node.innerHTML;
				}
				else if (iframeObj.document) {
				  	thingie.Node =iframeObj.document.body;	
					txt = iframeObj.document.body.innerHTML;
				}
			}
			catch ( e )
		{
		      callback ( thingie );
		    
		}
		    if ( thingie.Node != null &&  thingie.Node.getElementsByTagName ("pre").length>0)
		    {
		        var jasonElm = thingie.Node.getElementsByTagName ("pre")[0] ;
		        eval ( jasonElm.innerHTML )
		        {
		            thingie.Status = "OK";
				    thingie.Response = txt;
				    thingie.JasonObj = retval;
				    callback ( thingie );
		        }
		    }
			else if ( txt.indexOf ( "var" ) == 0 )
			{
				eval ( txt );
				
				thingie.Status = "OK";
				thingie.Response = txt;
				thingie.JasonObj = retval;
				callback ( thingie );
			}
			else
			{
				thingie.Status = "OK";
				thingie.Response = txt;
				callback ( thingie );
			}
		}
		catch( e )
		{
			thingie.Status = "NOTOK";
			thingie.Response = "";
			thingie.Error = e;
			callback ( thingie );
		}
	}
}
var trailimage=["", 100, 99] //image path, plus width and heigh
var offsetfrommouse=[10,-20] //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset
var displayduration=1 //duration in seconds image should remain visible. 0 for always.




function gettrailobj(){


    
 return $j('#trailimageid');
}

function followmouse(e){
var xcoord=offsetfrommouse[0]
var ycoord=offsetfrommouse[1]
if (typeof e != "undefined"){
xcoord+=e.pageX
ycoord+=e.pageY
}
else if (typeof window.event !="undefined"){
xcoord+=truebody().scrollLeft+event.clientX
ycoord+=truebody().scrollTop+event.clientY
}
var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)
if (xcoord+trailimage[1]+3>docwidth || ycoord+trailimage[2]> docheight)
gettrailobj().css({ display:"none"}); 
else 
gettrailobj().css({ display:""}); 

var cssObj = {
        left: xcoord+"px",
        top: ycoord+"px",
        visibility:"visible"
      };
gettrailobj().css(cssObj);

}

function truebody(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function hidetrail(){
gettrailobj().css({ visibility:"hidden"}); 
$j(document).unbind('mousemove', followmouse)

}

function AsyncAddToCart ( url, processingCaption )
{
   
    var otrail = document.getElementById('processingCaptionID');
    otrail.innerHTML = processingCaption;
    
    $j(document).bind('mousemove', followmouse);
    //set up div ... for waiting...
   AsyncXDomainIframeCall (url , AsyncAddToCartCallback );
}


var cartcontent = null;
var totalcartquantity = 0;
var asyncCartObj = null;
var isaddingtocart = false;
function AsyncAddToCartCallback ( rsp )
{

   inflyoutmax = false;
   isaddingtocart = true;
   if ( rsp.Status != "OK")
   {
        hidetrail();
        return;
   }
   else
    {
     hidetrail();
     var jasonCart = rsp.JasonObj;

     var relatedproductscontent = "";
     
     cartcontent = "<div id=\"pbarcontent\" name=\"carttemp\" class=\"pbarcontentcart\" style=\"width:350px;float:left;\">";
      
     if ( jasonCart.Error )
     {
        cartcontent = cartcontent + " <div class=\"cartItems_error\">" + jasonCart.Error + "</div>";
                     
     }
     else
     {
        var showRelatedProd = true;
        var caption = jasonCart.RelatedProductsCaption ;
        
        if ((caption == null)  || (jasonCart.RelatedProductsUrl == null))
        {
            showRelatedProd = false;
        }
        else if (caption!= null && (caption.length > 0))
         {
            if (caption.substring (caption.length -1 ) == " ")
            {
              showRelatedProd = false;
            }
         }
         else
         {
            showRelatedProd = false;
         }
        
         if (showRelatedProd == true)
           {
                relatedproductscontent = "<div class=\"simpleButtonMODIFIED\" style=\"float:left;\"><a href=\"" + jasonCart.RelatedProductsUrl + "\" style=\"text-decoration:none\"><span name=\"silver_Btn\" class=\"silverBtn\"><div class=\"silverBtnLeft\">"+
                        "</div><div class=\"silverBtnMid\">" + jasonCart.RelatedProductsCaption + "</div><div class=\"silverBtnRight\"></div></span></a></div><div class=\"cartspacer\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" width=\"248\" height=\"5\" border=\"0\" alt=\"\" /></div>";
            }

         
         cartcontent = cartcontent + " <div class=\"cartTopInfo\"><div class=\"cartItems_bold\">" + jasonCart.CartTopInfo + "</div></div>"+
                        
                        "<div class=\"cartItem\">"+
                        "<div class=\"pbarspacer\"><img src=\""+m_imgPfx+"/images/global/general/spacer.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></div>"+
                        "<div class=\"productImage\"><img src=\""+ jasonCart.Image+"\" width=\"40\" border=\"0\" alt=\"\" /></div>"+
                        "<div class=\"productDesc\"><span class=\"productTitle\" title=\"" + jasonCart.ShortDescription + "\">"+jasonCart.ShortDescription+"</span><br />"+           
                       "</div>"+
                       "<div class=\"productPrice\" style=\"width:150px;\">"+jasonCart.Price+"</div>";
                       
                       
        }
                        
                        
        cartcontent = cartcontent +  "<div style=\"clear:both;\"></div>"+
                       "<div class=\"productDivide\"></div>"+
                      "<div class=\"cartspacer\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" width=\"320\" height=\"10\" border=\"0\" alt=\"\" /></div>"+relatedproductscontent +
                        "<div class=\"simpleButtonMODIFIED\" style=\"float:right;\"><a href=\"" + jasonCart.CartLinkUrl + "\"><span name=\"green_Btn\" class=\"greenBtn\"><div class=\"greenBtnLeft\">"+
                       "</div><div class=\"greenBtnMid\">" + jasonCart.CartLinkCaption + "</div><div class=\"greenBtnRight\"></div></span></a></div>"+                    
                        "<div class=\"simpleButtonMODIFIED\" style=\"float:left;\"><a href=\"javascript:CollapseOnContinueShopping('cart')\" style=\"text-decoration:none\"><span name=\"silver_Btn\" class=\"silverBtn\" style=\"\"><div class=\"silverBtnLeft\">"+
                        "</div><div class=\"silverBtnMid\" style=\"\">" + jasonCart.ContinueShoppingCaptoin + "</div><div class=\"silverBtnRight\"></div></span></a></div><div class=\"pbarspacer\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></div>"+ 
                           "<div class=\"cartspacer\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" width=\"300\" height=\"5\" border=\"0\" alt=\"\" /></div>"+
                       "</div>" +
                       "</div>";
         totalcartquantity    =      jasonCart.CartQuantity;   
                
         InitOpenCartItem();
	    
	
    }
    
}

function InitOpenCartItem()
{
        
        m_cartPages = new Array();
        
        if (inflyoutmax)
        {
          
            return;
        }
        
        if (isbloated == false)
        {
            if ( isaddingtocart )
             {
                 var cartDiv = getRawObject( "flyoutcartbody" );
                
                 cartDiv.innerHTML ="";
                
	             m_pbarContentDiv = null;
	             currentID = null;
	             m_cartPages = new Array();
	             scroll(0,0);
                 flyoutmax('carttemp','350');
                 isaddingtocart = false;
              }
             
         }
         else
         {
            if ( isaddingtocart )
            {
            CollapseOnContinueShopping("cart");
            isbloated = true;
            setTimeout("InitOpenCartItem()",250);
            }
            
         }
   
     
}

function CollapseOnContinueShopping(id)
{

flyoutmaxclear();
delayMin = setTimeout( "shrinkIt('" + id + "',true)", 0 );

}

function addOnLoad( fn )
{
	if ( onloadFired )
	{
	    fn();
		return;
	}
	if( window.onload != safeLoad )
	{
		var oldOnload = window.onload;
		var found = false;
		for ( cnt = 0; cnt < loaded.length ; cnt ++ )
		{
			if ( loaded[cnt] == oldOnload )
			{
				found = true;
				break;
			}
		}
		if ( !found )
		{
			loaded[loaded.length] = oldOnload;
		}
		m_runSafeLoad = true;
		window.onload = safeLoad;
	}
	loaded[ loaded.length ] = fn;
}

setTimeout( "ensureLoadPage()" , 10000 );
function ensureLoadPage ()
{
    if (onloadFired)
    {
        return;
    }
    addsReady ( safeLoad );
    
    return;
  
}

function safeLoad()
{
	
	onloadFired = true;
	if(m_runSafeLoad)
	{
		m_runSafeLoad = false;
		for( var i=0;i<loaded.length;i++ )
		{
			if( loaded[i] != undefined )
			{
				loaded[i]();
			}
		}
	}
}
function getXMLHTTPObj()
{
	var obj = false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
try { obj = new ActiveXObject( "Msxml2.XMLHTTP" ); } catch( e ){ try { obj = new ActiveXObject( "Microsoft.XMLHTTP" ); } catch( oc ) { obj = false; } }
	@end @*/
	if( !obj && typeof XMLHttpRequest != "undefined" )
	{
		try
		{
			obj = new XMLHttpRequest();
		}
		catch(e)
		{
			obj = false;
		}
	}
	if( !obj )
	{
		return undefined;
	}
	return obj;
}
function generateUrl( arr )
{
	var url = "";
	if ( typeof( m_requestURLBase ) != 'undefined' )
	{
		url = m_requestURLBase + "&i=" + arr.join( "/+" );
	}
	return url;
}
function tnLink ( anchor )
{
	var tnRef = null;
	var tnNum = null;
	if ( anchor == null )
	{
		return;
	}
	var childNodes = anchor.getElementsByTagName( "SUP");
	for ( i=0;i<childNodes.length;i++)
	{
		tnRef = childNodes[i].getAttribute ("tn");
		if ( tnRef != null )
		{
			tnNum= childNodes[i].innerHTML;
		}
	}
	if ( tnNum != null && tnNum.length > 0 && !( /\D/.test( tnNum )) )
	{
		document.location.href= "#tn" + tnNum;
		return;
	}
	if ( tnRef != null )
	{
		window.open(m_glossaryURLBase + "?f=" + tnRef,'tnwin','WIDTH=400,HEIGHT=300,RESIZABLE=YES,SCROLLBARS=YES,STATUS=NO,TOOLBAR=NO,LEFT=0,TOP=0');
	}
	return;
}
function ctabInit ()
{
    var tds = document.getElementsByTagName ( "TD");
    for ( var i = 0 ; i < tds.length ; i ++ )
    {
        if ( tds[i].className =="unselected" || tds[i].className =="current")
        {
          
            var font = getchildbyTagName ( tds[i], "FONT");
            if ( font != null && font.offsetHeight > 20 )
            {
               
                font.style.fontWeight="normal";
                if ( font.offsetHeight > 20 )
                {
                    font.style.display="block";
                    font.style.width =  font.offsetWidth +  "px";
                }
                
            }
           
        }
        
    }
    
       var tabDiv = document.getElementById("cntTabsCnt");
       if (tabDiv != null)
       {
       container = parentNode (tabDiv);
       if (container != null)
       {
       $j("#cntTabsCnt").css("width",container.scrollWidth);
       }
       }
}

function getchildbyTagName ( node , tag )
{
    
    if ( node.childNodes == null )
    {
        return null;
    }
    for ( var i = 0 ; i < node.childNodes.length ; i ++ )
    {
        if ( node.childNodes[i].tagName == tag )
        {
            return node.childNodes[i];
        }
        var match =  getchildbyTagName ( node.childNodes[i] , tag );
        if ( match != null )
        {
            return match;
        }
    }
    
}
function intiAjShCnt ()
{
    ctabInit();
    if ( typeof( TTHide ) != "undefined" )
    {
            TTHide();
    }
//    if ( typeof(InitLexicon) != "undefined" )
//    {
//        InitLexicon();
//    }
    findForm();
    Resize();
    RenderFlash();
}



function addBackButtonHistory( fid, cid, url )
{
    if(document && document.body)
    {
    	var bckfrm = document.getElementById( "BackButtonHistoryFrame" );
    	var ts = new Date();
    	if( !bckfrm )
    	{
        	bckfrm = document.createElement( "iframe" );
        	bckfrm.id = "BackButtonHistoryFrame";
        	bckfrm.name = "BackButtonHistoryFrame";
        	bckfrm.style.border = "0px";
		    bckfrm.style.width = "0px";
		    bckfrm.style.height ="0px";
        	bckfrm.src = m_imgPfx + "/images/global/ajax/backbuttonhistory.htm?fid&cid=&url=&ts=" + ts.getDate();
        	document.body.appendChild( bckfrm );
    	}
    	else
    	{
        	bckfrm.src = m_imgPfx + "/images/global/ajax/backbuttonhistory.htm?fid=" + fid + "&cid=" + cid + "&url=" + encodeURIComponent(url) + "&ts=" + ts.getDate();
    	} 
    }
    else
    {
	    try
	    {
	        addsReady(addBackButtonHistory(fid, cid, url));
	    }
        catch(e)
        {}
    }
}
function ajShow( fid, cid, url, isHistory, isInIt )
{
	
	//For rating tabby stuff
	var regexString="/?~tab=[\\w]*&~wsf=[\\w]*&";
        url = url.replace( new RegExp(regexString), "" );

        m_printviewHref = url.substring( 0, url.indexOf( "&~wsf" ) );
	    var tabDiv = null;
	    var tabMode= false;
	    container = document.getElementById( fid + "_frm");
	    if ( container == null )
	    {   
		        tabDiv = document.getElementById("cntTabsCnt");
		        if ( tabDiv == null )
		        {
			        return;
		        }
		        container = parentNode (tabDiv);
	    }
	    else
	    { 
		        continer = document.getElementById(cid);
	    }
	    
	    if ( container == null )
	    { 
		        return;
	    }
	    
	    if( isInIt )
	    {
	        if( container["initHistory"] )
	        {
	            container.innerHTML= container["initHistory"]; // Load Initial State
	            intiAjShCnt();
	        }
            return;
	    }

	    if ( container[cid] == "...")
	    { 
		        return;
	    }
	    
	    if( isHistory )
        {
            url = decodeURIComponent( url );
	    }
	    
	    if ( container[cid] != null )
	    { 

            $j(container).html(container[cid]);
             $j("#cntTabsCnt").css("width",container.scrollWidth);
            if( !isHistory )
            {
                addBackButtonHistory( fid, cid, url );
            }
		    intiAjShCnt();
		    return;
	    }
	    
	    if ( tabDiv != null )
	    { 
		        tabDiv.style.backgroundColor ="#fbfbfb";
	    }
	    
	    var syncObj = getXMLHTTPObj();
	    if ( syncObj == null || syncObj == undefined )
	    { 
		        var pos = url.indexOf ( "~wsf");
		        if ( pos > 0 )
		        {
			            url = url.substring( 0 , pos );
		        }
		        document.location.href= url;
		        return;
	    }
	     
	    $j.ajax({
                type: "GET",
                url: url,
                success: function(data)
	            {
    	            
	                addBackButtonHistory( fid, cid, url );
                    if( container["initHistory"] == null )
                    {
                        container["initHistory"] = container.innerHTML; // Store Initial State for History
                    }
                    container[cid] = data;
                    $j(container).html( data );
                   
                    intiAjShCnt();
	            },
	            complete:function (xml, textStatus) {
	                if (xml != undefined)
	                {
	                    var path = xml.getResponseHeader("METRICSPATH");
	                    if (path !=  undefined)
	                    {
	                    setIEWatchMetricsPath(path);
	                    }
	                    $j("#cntTabsCnt").css("width",container.scrollWidth);
	                }      
                }
                });  
}

function setIEWatchMetricsPath( path )
{
    var mObj = $j("head META[@name='METRICSPATH']");
    if (mObj != undefined)
    {
        try
        {
            mObj.attr("content","&eiwatch=" + path);
        }
        catch(e){}
    }
}


 


function findForm()
{
		var formIdx = 0;
		for ( formIdx = 0 ; formIdx < document.forms.length;formIdx ++ )
		{
				var  urlTabs = document.forms[formIdx].action.toLowerCase();
				if(urlTabs.indexOf('~wsf=tabs') !=-1)
				{
						document.forms[formIdx].action = urlTabs.replace("&~wsf=tabs", "");
				}
		}
}
var ajaxavailable = ( getXMLHTTPObj() != undefined );
var xmlreqs = undefined;
/* OnlineOpinion (S3t,1424b) */
/* This product and other products of OpinionLab, Inc. are protected by U.S. Patent No. 6606581, 6421724, 6785717 B1 and other patents pending. */
var custom_var,_sp='%3A\\/\\/',_rp='%3A//',_poE=0.0, _poX=0.0,_sH=screen.height,_d=document,_w=window,_ht=escape(_w.location.href),_hr=_d.referrer,_tm=(new Date()).getTime(),_kp=0,_sW=screen.width;_d.onkeypress=_fK;function _fK(_e){if(!_e)_e=_w.event;var _k=(typeof _e.which=='number')?_e.which:_e.keyCode;if((_kp==15&&_k==12))_w.open('https://secure.opinionlab.com/pageviewer/pv_controlboard.html?url='+_fC(_ht),'PageViewer','height=529,width=705,screenX='+((_sW-705)/2)+',screenY='+((_sH-529)/2)+',top='+((_sH-529)/2)+',left='+((_sW-705)/2)+',status=yes,toolbar=no,menubar=no,location=no,resizable=yes');_kp=_k};function _fC(_u){_aT=_sp+',\\/,\\.,-,_,'+_rp+',%2F,%2E,%2D,%5F';_aA=_aT.split(',');for(i=0;i<5;i++){eval('_u=_u.replace(/'+_aA[i]+'/g,_aA[i+5])')}return _u};function O_LC(){_w.open('http://ccc01.opinionlab.com/comment_card.asp?time1='+_tm+'&time2='+(new Date()).getTime()+'&prev='+_fC(escape(_hr))+'&referer='+_fC(_ht)+'&height='+_sH+'&width='+_sW+'&custom_var='+custom_var,'comments','width=535,height=192,screenX='+((_sW-535)/2)+',screenY='+((_sH-192)/2)+',top='+((_sH-192)/2)+',left='+((_sW-535)/2)+',resizable=yes,copyhistory=yes,scrollbars=no')};function _fPe(){if(Math.random()>=1.0-_poE){O_LC();_poX=0.0}};function _fPx(){if(Math.random()>=1.0-_poX)O_LC()};window.onunload=_fPx;function O_GoT(_p){_d.write('<a href=\'javascript:O_LC()\'>'+_p+'</a>');_fPe()}
	function doOpionlabs( _p)
	{
		var metricPath = null;
		var metas = document.getElementsByTagName ( "META");
		var _lG =pageLang + "-" + pageCnty + ".";
		if ( pageLang == "jp" )
		{
			_lG = "ja-JP.";
		}
		else if ( pageLang == "en")
		{
			_lG = "";
		}
		if ( metas != null )
		{
			for ( i = 0 ; i < metas.length ; i ++)
			{
				if ( metas[i].name== "METRICSPATH" )
				{
					metricPath = metas[i].getAttribute("CONTENT");
					if ( metricPath != null && metricPath.length > 9)
					{
						metricPath = metricPath.substring( 9 );
					}
					break;
				}
			}
		}
		var ssid = getCookie ( "SITESERVER" );
		if ( ssid != null && ssid.length > 3 )
		{
			ssid = ssid.substring ( 3 );
		}
		custom_var = metricPath + "|" + ssid + "|" + pageSeg;
		_rp='%3A//'+_lG;
		if ( _p != null )
		{
			O_GoT(_p);
		}
	}
	
	function doIPerceptions( ratio , jsFile)
	{
		var strURL = document.URL;
		var country = "";
		var language = "";
		var segment = "";
		var department= "";

		country = getQueryVariable("c");
		country = (country==null || country=="") ? "us" : country; 
		language = getQueryVariable("l");
		language = (language==null || language=="") ? "en" : language;
		segment = getQueryVariable("s");
		segment = (segment==null || segment=="") ? "bsd" : segment;

		if (strURL.indexOf("support") != -1)
		{
			segment = "dhs";
			department= "_support";
		}
		else
		{
			department= "";
		}
		var randomNumber = Math.floor((Math.random() * 100));
		if (randomNumber < ratio )
		{
			loadIPScript( jsFile + 'wv359redirect_' + country + '_' + language + "_" + segment + department + '.js');
		}
	}

	function loadIPScript( path )
	{
		var head = document.getElementsByTagName("head")[0];
		script = document.createElement('script');
		script.type = "text/javascript";
		script.src = path;
		head.appendChild(script);
	}
	
	//start of promo compare reinvention
	
	function SetProductStyle(products,style)
	{
		    for (var i = 0; i < products.length; i++)
		    { 
				    document.getElementById(products[i]).className = style;
		    }
	}
	function ProductsOnMouseOver(products)
	{
		    var style = ' para_small product_highlight_background_image product_border_gray product_div ';
		    SetProductStyle(products,style);
	}
	
	function ProductsOnMouseOut(products)
	{
		    var style = ' para_small product_border_white product_div ';
		    SetProductStyle(products,style);
	}
	
	function SetPromoStyle(promos,positions,promoStyle,titleStyle,promoPerRow)
	{
		    var temp = '';
		   
		    for (var i = 0; i < promos.length; i++)
		    {  
			        temp += promoStyle;
			        
				    if ((positions[i] % promoPerRow) == 1)
			        {
					        temp += " promo_border_left ";
			        }  
			        if (positions[i] <= promoPerRow)
			        {
					        temp += " promo_border_top ";
			        }
			       
			        document.getElementById(promos[i]).className = temp;
			        document.getElementById(promos[i].replace('_promo','_promo_title')).className = titleStyle;
			        temp = '';
		    }
	}
	function PromosOnMouseOver(promos,positions,promoPerRow)
	{
		    var promoStyle = ' para_small promo promo_border promo_highlight_background_color ';
		    var titleStyle = 'lnk_promo_white';
		    SetPromoStyle(promos,positions,promoStyle,titleStyle,promoPerRow);
	}
	
	function PromosOnMouseOut(promos,positions,promoPerRow)
	{
		    var promoStyle = ' para_small promo promo_border promo_background_color ';
		    var titleStyle = 'promo_compare_promo_title';
		    SetPromoStyle(promos,positions,promoStyle,titleStyle,promoPerRow);
	}
	
	function Resize()
	{
		    var obj = document.getElementById('scriptparams');
		    var pro = document.getElementById('promocompare_promos');
		    var proWidth = 0;
		    if( pro != null )
		    {
		        proWidth = pro.offsetWidth;
		    }
		
		    if (obj != null)
		    {
			        var productString = obj.value;
			        var products = productString.split(",");
			
				    var i;
				    var maxDescHeight = 0;
				    var maxNameHeight = 0;
			        var maxPriceHeight = 0;
			        var totalWidth = 0;
			       
			   	    for (i = 0; i < products.length; i++)
				    {
					        if (document.getElementById(products[i].replace('div','desc')).offsetHeight > maxDescHeight)
						    {
								    maxDescHeight = document.getElementById(products[i].replace('div','desc')).offsetHeight;
						    }
						
						    if (document.getElementById(products[i].replace('div','price')).offsetHeight > maxPriceHeight)
						    {
								    maxPriceHeight = document.getElementById(products[i].replace('div','price')).offsetHeight;
						    }
						    if (document.getElementById(products[i].replace('div','name')).offsetHeight > maxNameHeight)
						    {
								    maxNameHeight = document.getElementById(products[i].replace('div','name')).offsetHeight;
						    }
						    totalWidth += document.getElementById(products[i].replace('_div','')).offsetWidth;
				    }
				    
			   	    for (i = 0; i < products.length; i++)
				    {
						    document.getElementById(products[i].replace('div','desc')).style.height = maxDescHeight;
						    document.getElementById(products[i].replace('div','price')).style.height = maxPriceHeight;
						    document.getElementById(products[i].replace('div','name')).style.height = maxNameHeight;
			        }
			  	    totalWidth = totalWidth > proWidth ? totalWidth : proWidth;
				    if (totalWidth > 696)
				    {
					    if (document.getElementById('cntTabsCnt') != null)
					    {
					        document.getElementById('cntTabsCnt').style.width = totalWidth + 40;//40 is the spaces between the product and tab content border on both sides
					    }
				    }
			}
	}
	
	addsReady(psInit);
	
	function psInit ()
	{

	    if ( pageSeg=="dhs" && pageCnty=="us" )
	    { 
	        var path = m_imgPfx + "/images/global/js/ps2b.js";
	        //pants
	        var head = document.getElementsByTagName("head")[0];
	        if ( head != null )
	        {
	            try
	            {
		            var script = document.createElement('script');
		            script.type = "text/javascript";
		            script.src = path;
		            head.appendChild(script);
		        }
		        catch( e )
		        {}
		    }
		}
	
	}
	
	//end of promo compare reinvention
    function divFade( id, startOpac, endOpac, incOpac, fadeSpeed, validate, callback ) // div name/id, start opacity %, end opacity %, opacity increment %, timeout speed, valid div totally faded in or out, callback function
    {
        var div = document.getElementById( id );
        if( validate )
        {
            if( startOpac == 0 && endOpac != 0 && div.style.display == "block" )
            {
                return;
            }
            if( startOpac == 100 && endOpac != 100 && div.style.display == "none" )
            {
                return;
            }
        }
        div.style.filter    = "alpha(opacity=" + startOpac + ")";
        var timeoutFade = null;
        if( div )
        {
            div.style.filter    = "alpha(opacity=" + startOpac + ")";
            div.style.opacity   = (startOpac/100);
            div.style.display   = "block";
            if( startOpac == endOpac )
            {
                div.style.filter    = "alpha(opacity=" + endOpac + ")";
                div.style.opacity   = (endOpac/100);
                if( endOpac == 0 )
                {
                    div.style.display = "none";
                }
                if( callback )
                {
                    callback();
                }
            }
            else if( startOpac < endOpac && startOpac+incOpac < endOpac )
            {
                timeoutFade = setTimeout( "divFade('" + id + "', " + (startOpac+incOpac) + ", " + endOpac + ", " + incOpac + ", " + fadeSpeed + ", " + validate + ", " + callback + ")", fadeSpeed );
            }
            else if( startOpac > endOpac && startOpac-incOpac > endOpac )
            {
                timeoutFade = setTimeout( "divFade('" + id + "', " + (startOpac-incOpac) + ", " + endOpac + ", " + incOpac + ", " + fadeSpeed + ", " + validate + ", " + callback + ")", fadeSpeed );
            }
            else
            {
                timeoutFade = setTimeout( "divFade('" + id + "', " + endOpac + ", " + endOpac + ", " + incOpac + ", " + fadeSpeed + ", " + validate + ", " + callback + ")", fadeSpeed );
            }
        }
    }

function HideRow(id)
{
  
  if( document.getElementsByName )
  {
	
	var rows = document.getElementsByName( id );
	if( rows && rows.length > 0 )
	{
		
		for( i=0;i<rows.length;i++ )
		{
			
			if ( rows[i].style.display == "none" )
			{
				rows[i].style.display = "";
			}
			else
			{
				
				rows[i].style.display = "none" 	
			}
		}
	}
  }
	
}
function compareClick ()
{
    
    var enabled = $j(".compareprodcb[@checked]").length > 0 ;
	$j("span[@name=compare_btn]").attr( "disabled", !enabled )
    
    if(enabled)
    	$j("span[@name=compare_btn]").attr("class", "btn_compare_new");
    else
	$j("span[@name=compare_btn]").attr("class", "btn_compare_newDisabled");
 
    
}
function compareItems()
{
    var cbs =  $j(".compareprodcb[@checked]");
    if ( cbs.length > 0 )
    {
        var lst = new Array();
        cbs.each ( function(){ lst[lst.length]=this.value;});
        var url = m_compareUrl + "&prods=" + lst.join ( ',');
		document.location = url ;
    }
	 
}

function ToggleExpandCollapse(id)
{
	
	HideRow(id);
	
	var divs = document.getElementsByName("dynamic_compare_toggle");
	
	if( divs && divs.length > 0 )
	{
		for( i=0;i<divs.length;i++ )
		{
			
			if ( divs[i].style.display == "none" )
			{
				divs[i].style.display = "";
			}
			else
			{
				
				divs[i].style.display = "none" 	
			}
		}
	}
}
//moved var initialization to top as a workaround for escaping
// wierd netscape exception on accessing screen.size
//which causes this var not to be initialized

function addOnMenuLoad( fn )
{
    if ( m_menuloaded )
	{
		fn();
	}
	else
	{
	    m_menuload[ m_menuload.length ] = fn; 
	}
}
function onMenuLoad ()
{
    m_menuloaded = true;
    for ( var i = 0 ; i < m_menuload.length ;i++ )
    {
        m_menuload[i]();
    }
   
}

function addScript ( jsfile, callback )
{
   var path = m_imgPfx + jsfile;
    var head = document.getElementsByTagName("head")[0];
    if ( head != null )
    {
        try
        {
            var script = document.createElement('script');
            script.type = "text/javascript";
            script.src = path;
            if ( callback )
            {
                script.onreadystatechange = function ()
                {
                    if(callback && ("complete" == script.readyState || "loaded" == script.readyState))
                    {callback();callback= null;}
                }
                script.onload= function ()
                {
                    if ( callback )
                    {
                        callback();callback= null;
                    }
                }
            }
            head.appendChild(script);
        }
        catch( e )
        {
            alert ( e.description );
        }
    }
}

function showDialog( dialog )
{
   if ( typeof ( LoadDialog ) == "undefined" )
   {
        addScript ( "/images/global/js/dialog.js" , function (){showDialog( dialog );});
        return;
   }
   LoadDialog( dialog );
}

function showYPanel ( id , header , body, footer , config )
{
    if ( typeof ( YAHOO ) == "undefined" || typeof ( YAHOO.widget ) == "undefined" )
    {
        addScript ( "/images/global/js/yui/yui.js" , function (){showYPanel( id , header , body, footer, config );});
        return;
    }
    if (  typeof ( YAHOO.storm ) == "undefined" )
    {
        YAHOO.namespace("storm.container");
    }
    var panel = YAHOO.storm.container[id];
    var needsRender = panel == null;

    if ( config == null )
    {
        config = { width:"300px", fixedcenter:true , visible:false, constraintoviewport:true , effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25}   };
    }
    if ( config.makeFade )
    {
        if( config.fadeSpeed != null )
        {
            config.effect = {effect:YAHOO.widget.ContainerEffect.FADE,duration:config.fadeSpeed} ;
        }
        else
        {
            config.effect = {effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25} ;
        }
    }
    if ( needsRender )
    {
        panel = new YAHOO.widget.Panel(id , config );
        YAHOO.storm.container[id] = panel;
    }
    else
    {
        for ( i in config )
        {
            if ( config[i] != panel.cfg.getProperty( i ))
            {
                panel.cfg.setProperty ( i  , config[i] );
            }
        }
    }
    panel.setHeader ( header );
    panel.setBody ( body );
    panel.setFooter ( footer );
    if ( needsRender )
    {
        panel.render(document.body);
    }
    if( config.visible != false )
    {
        panel.show ();
    }
}

function hideYPannel ( id )
{
   if ( typeof ( YAHOO ) == "undefined" || typeof ( YAHOO.widget ) == "undefined" )
   {
        return;
   }
   var panel = YAHOO.storm.container[id];
   if ( panel != null )
   {
        panel.hide();
   }
}
//For appending the site server id for ipercerptions - can be used with any url
function AppendSiteServerId(url)
{
        var guidQs = (url.indexOf("?") != -1) ? "&guid=" : "?guid=";
	url = url + guidQs + getSiteServerId();	
	return url;
}
function getSiteServerId()
{
	var cookie = getCookie ( "SITESERVER" );
	var cookieValue = getCookieKeyValue("SITESERVER", "ID");
	return cookieValue;	
}


function RenderBorder()
{

document.writeln( "<table id=\"borderTable\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ededed\">" );
document.writeln( "<tr><td bgcolor=\"#999999\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" border=\"0\" height=\"1\" width=\"1\" alt=\"\" /></td></tr>" );
document.writeln( "</table>" );
}

function RenderViewLargeTextURL(cls,lnk,txt)
{
var viewUrl = "<div class=\"" + cls + "\"><a href=\"" + lnk + "\" style=\"padding-left:20px\">" + txt + "</a></div>";
              
document.writeln(viewUrl);

}
function RenderStartLegalLinks()
{
 document.writeln( "<table width=\"100%\" cellpadding=\"0\" style=\"padding-left:10px;\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ededed\">" );           
            document.writeln( "<tr><td colspan=\"2\" ><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" border=\"0\" height=\"5\" width=\"1\" alt=\"\" /></td></tr><tr><td width=\"100%\" align=\"center\" valign=\"top\">" );
}

function RenderEndLegalLinks(gototop)
{
 document.writeln( "</td><td><table><tr><td valign=\"middle\"><img src=\"" + m_imgPfx + "/images/global/brand/ui/arrow_top.gif\" width=\"7\" height=\"4\" alt=\"\" border=\"0\"></td><td style=\"padding-right:6px;\" valign=\"middle\"><a href=\"#mastheadtop\"><span class=\"para\">" + gototop + "</span></a></td></tr></table></td></tr><TR><td colspan=\"2\" ><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" alt=\"\" border=\"0\" height=\"5\" width=\"1\" /></td></tr><TR><td colspan=\"2\" bgcolor=\"#cdcdcd\"><img src=\"" + m_imgPfx + "/images/global/general/spacer.gif\" alt=\"\" border=\"0\" height=\"1\" width=\"1\" /></td></tr></table>" );
}

//for resizing result grid control
function rgResizeContainerDiv()
{  
  
 var rows = $j('.rgRow');
  
    if(rows.length > 0)
    {
         var diff = 0;
            for(var i = 0; i < rows.length; i ++ )
            {
            
              var divs = $j(rows[i]).find('div.rgOuterBodyContainer div.rgBodyContainer div.rgBody');
              var footer = $j(rows[i]).find('div.rgOuterBodyContainer div.rgFooterContainer');
              
             if ( divs.length > 0 ) {
                var h1 = $j(divs[0]).height();
                var h2 = $j(rows[i]).height();
                diff = (h2 - h1 - 15 - 40);
             }
             
             if ( footer.length > 0 ) 
             {
               $j(footer[0]).height(40);
               if ( diff > 4) {
                 $j(footer[0]).css('margin-top',diff);
              }
             
             }            
                            
             }
        
    } 
}

function ajInit()
{

}

var m_tnNeed = new Array();
var m_tnData = new Array();
var m_tnCount = 1;
function inittechnotes( elem )
{
    var tnid = $j(elem).attr("tn");
    if( tnid && tnid.length > 0 && m_tnData[tnid] == undefined && m_tnNeed[tnid] == undefined )
    {
        m_tnNeed[tnid] = tnid;
        if ( typeof( m_requestURLBase ) != 'undefined' )
	    {
    	    $j.get(m_requestURLBase + "&i=" + tnid,function(data)
		    {
		        eval ( data.replace( /\r\n/g, '' ) );
		        var note = {"k":tnArray[0].k, "v":tnArray[0].v, "i":m_tnCount};
	            m_tnData[tnArray[0].k] = note;
	            var tns = $j("sup[@tn=" + tnid + "]");
	            if( tns.length > 0 )
	            {
	                tns.each( function(){
	                    if( m_tnData[tnid] != null )
	                    {
	                        $j(this).html( m_tnData[tnid].i );
	                        $j(this).click(function(){technoteclick(this);});
	                    }
	                });
	            }
                m_tnCount++;              
		        var technotehtml = "<div " + (m_isRtl ? "style=\"text-align:right\"" : "") + "><a style='color:black;' name='tn" + note.i + "'><sup>" + note.i + "</sup></a>&nbsp;" + note.v + "</div><br />";
		        $j("#footer").append( technotehtml );
	            $j("#endnotes").append( technotehtml );
		    });
	    }
    }
    if( m_tnData[tnid] != undefined )
    {
        $j(elem).html( m_tnData[tnid].i );
        $j(elem).click( function(){technoteclick( this )});
    }
}
function technoteclick( sender )
{
    var tn = $j(sender).attr( "tn" );
	if( tn != undefined && m_tnData[tn] != undefined && m_tnData[tn].i != undefined && !( /\D/.test( $j(sender).html() )) )
    {
        document.location.href= "#tn" + m_tnData[tn].i;
        return;
    }
    if( tn != undefined && m_glossaryURLBase != undefined && m_glossaryURLBase.length > 0 )
    {
        window.open(m_glossaryURLBase + "?f=" + tn,'tnwin','WIDTH=400,HEIGHT=300,RESIZABLE=YES,SCROLLBARS=YES,STATUS=NO,TOOLBAR=NO,LEFT=0,TOP=0');
    }
}

function InitTechNotes()
{
    $j("sup[@tn]").livequery(function(){inittechnotes(this);});
}

function InitClueTip()
{


    $j(".hv_cluetip") 
    .livequery(function(){  
    $j(this).cluetip({ positionBy:'auto',width:'251px', cluetipClass: 'jtip',arrows: true, hoverIntent: false,showTitle: false,waitImage:false,onActivate:       function(e) {$j("#cluetip-inner").show();return true; } });

    });


    
     $j(".ic_cluetip")
    .livequery(function(){  
        $j(this).cluetip({width:'160px',topOffset:'10',splitTitle: '|', dropShadow: false, arrows:true,cluetipClass: 'jtip', showTitle: false,positionBy: 'bottomTop',hoverIntent: false,   cursor: 'default', onActivate:       function(e) { $j(this).attr('title', ''); return true; }});
    
        
    });


}

function PricingAlignment()
{
    $j("div[@name=pricing_descriptions]")
        .livequery(function(){
            var divs = $j("div[@name=pricing_descriptions]");var divHeight = 0;
            for(var i=0; i<divs.length; i++ )
            {
                var offsetHeight = divs[i].offsetHeight;
                divHeight = offsetHeight > divHeight ? offsetHeight : divHeight;
            }
            if( divHeight > 0 && this.offsetHeight < divHeight )
                this.style.height = divHeight;
        });
}

function  TTipBindEvents(){}

 function StringBuffer() { 
   this.buffer = []; 
 } 

 StringBuffer.prototype.append = function append(string) { 
   this.buffer.push(string); 
   return this; 
 }; 

 StringBuffer.prototype.toString = function toString() { 
   return this.buffer.join(""); 
 }; 
 
 
 
function getLwp()
{  
       var cntr = "";
       var segm = "";
       var lang = "";
	 var cs =   "";

       var gotq = window.location.href.split('?').length > 1;
  
       if (gotq  ) {
         cntr = $j.jqURL.get("c");
         segm = $j.jqURL.get("s");
         lang = $j.jqURL.get("l");
	   cs =   $j.jqURL.get("cs");
	 }
       var lwp = new StringBuffer();
       if ( cntr == null || cntr.length == 0 )
       {
 	   cntr = getCookieKeyValue(" lwp","c");
       }
	 if ( segm == null || segm.length == 0 )
       {
	   segm = getCookieKeyValue(" lwp","s");
       }	
	 if ( lang == null || lang.length == 0 )
       {
	   lang = getCookieKeyValue(" lwp","l");
       }
	 if ( cs == null || cs.length == 0)
	 {
	   cs = getCookieKeyValue(" lwp","cs");
	 }
       if ( cntr != null && cntr.length != 0 )
       {
	  lwp.append("&c=");
        lwp.append(cntr);
       }
       if ( segm != null && segm.length != 0)
       {
	  lwp.append("&s=");
	  lwp.append(segm);		
       }
       if ( lang != null && lang.length != 0)
       {
	  lwp.append("&l=");
	  lwp.append(lang);
       }
       if ( cs != null && cs.length != 0)
	 {
	  lwp.append("&cs=");
	  lwp.append(cs);
	 }
       return lwp.toString().split('#')[0];
}

function NewShowHide(id) {
	
	if( document.getElementsByName )
	{
		
		var temp;
		var newarray= id.split(' ');
	
		for(var j= 0;  j <  newarray.length; j++)
		{
			temp=newarray[j];
			
			var divs = document.getElementsByName( temp );

			if( divs && divs.length > 0 )
			{	
				for( i=0;i<divs.length;i++ )
				{		
					if ( divs[i].style.display == "none" )
					{
						divs[i].style.display = "block";
					}
					else
					{
						divs[i].style.display = "none"; 	
					}
				}
			}	
		}	
	}
}
