
//Simple window opener for the Help site
//
  function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
  }

// Open chat window with the given URL
function openChatWindow(url)
{
    window.open(url,'Presto_Support',"resizable=1,status=1,width=570,height=570");
}


//====================================================
// Adds a show or hide css rule for passed in class
//====================================================
function showHideClass(passedStyleSheetNumber, passedIsShow, passedClassName)
{
    var cssRuleSet = document.styleSheets[passedStyleSheetNumber];
    var displayString = "display:"
    var stylingToUse = "none;";
    
    //now that we have a rule that has been added lets see if we need to show or 
    //hide it
    if(passedIsShow)
    {
	    stylingToUse = "block";
    }
	
	
    //this is to make our script cross browser compatible
    //
    //Check for Mozilla          
	if (cssRuleSet.insertRule) 
	{
		cssRuleSet.insertRule(passedClassName +'{' + displayString + stylingToUse + '}', 100 );					  
	}
	//Check for IE 
	else if (cssRuleSet.addRule) 
	{
		cssRuleSet.addRule(passedClassName, (displayString + stylingToUse));
	}
	

}

//====================================================
// This is the method that chat iframe calls back to
//====================================================
function chatAgentAvailableCallback(isTrue)
{
    if(isTrue)
    {
        showHideClass(0, true, ".chatLink");
    }
    else
    {
        showHideClass(0, true, ".chatLink");
    }
}