    
    /*Create an exclusive approach that only shows one item open*/
    
  function wanscript_showjustme(button,other1,other2,other3,other4,other5,other6)
	{
	
		wanscript_showmore(button);
		HideMoreButton(other1);
		HideMoreButton(other2);
		HideMoreButton(other3);
		HideMoreButton(other4);
		HideMoreButton(other5);
		HideMoreButton(other6);
	}    

    function wanscript_showLayer(button)
	{
        //alert(document.getElementById("hndBrandsCount").value);
        var LayerCount =null;       
        var DivId ="specials_1_";
        var obj =document.getElementById("hndBrandsCount");		       
        if (obj!=null)
        {       
            LayerCount =obj.value;
            for(var count = 1; count<=LayerCount; count++)        
            {           
            if(button ==  DivId + count)
                wanscript_showmore(button);
            else
                HideMoreButton(DivId + count);
            }
        }		
	}    
    function wanscript_showmore(button)
	{
		// This to switch the displayed link - bigswap ();
		var el = document.getElementById(button);	
		if ( el.style.display == 'block' )
			el.style.display = 'none';
        else     			
    		el.style.display = 'block';
	}
	
	function HideMoreButton(button)
	{
	    document.getElementById(button).style.display="none";	    
	}

/*JAVASCRIPT LIBRARIES*/
/*begin - GET ELEMENT BY CLASS */
// ---
function $(strId){
	return document.getElementById(strId);
}
// ---
function getElementsByClassName(oElm, strTagName, strClassName){
	var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	strClassName = strClassName.replace(/\-/g, "\\-");
	var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
	var oElement;
	for(var i=0; i<arrElements.length; i++){
		oElement = arrElements[i];		
		if(oRegExp.test(oElement.className)){
			arrReturnElements.push(oElement);
		}	
	}
	return (arrReturnElements)
}
// ---
function addClassName(oElm, strClassName){
	var strCurrentClass = oElm.className;
	if(!new RegExp(strClassName, "i").test(strCurrentClass)){
		oElm.className = strCurrentClass + ((strCurrentClass.length > 0)? " " : "") + strClassName;
	}
}
// ---
function removeClassName(oElm, strClassName){
	var oClassToRemove = new RegExp((strClassName + "\s?"), "i");
	oElm.className = oElm.className.replace(oClassToRemove, "").replace(/^\s?|\s?$/g, "");
}
// ---

/*
CREDITS
    Written by Jonathan Snook, http://www.snook.ca/jonathan
    Add-ons by Robert Nyman, http://www.robertnyman.com
		
		Some ways to call it

To get all a elements in the document with a “info-links” class.
    getElementsByClassName(document, "a", "info-links");
		
To get all div elements within the element named “container”, with a “col” class.
    getElementsByClassName(document.getElementById("container"), "div", "col"); 
		
To get all elements within in the document with a “click-me” class.
    getElementsByClassName(document, "*", "click-me"); 
		
*/
/*end - GET ELEMENT BY CLASS*/

/*PROGRESSIVE FADE-IN EFFECT*/	
	function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
} 

/*Separate on/off switches for any menu display*/
function wanscript_quicklinks_on(mytarget)
	{//One that just works, no fancy
		var linkbox = document.getElementById(mytarget);
		linkbox.style.opacity = '1';		
		linkbox.style.display = 'block';	
	}
function wanscript_quicklinks_off(mytarget)
	{//One that just works, no fancy
		var linkbox = document.getElementById(mytarget);
		alert("Quicklinks Off");		
		linkbox.style.display = 'none';
	}
	
/*OLD WAY*/
/*Show & Hide just for the quicklinks that also dims content*/
    function wanscript_quicklinks(mytarget)
	{
		var linkbox = document.getElementById(mytarget);
		var myfiltre = document.getElementById("content"); /* to Make the page dim*/
		if ( linkbox.style.display == 'block' ) 
		{
				linkbox.style.display = 'none';
				myfiltre.style.opacity = "1";
//				document.container.className='my100_restore'; 
		}
        else 
        {
			/*myfiltre.style.opacity = "0.5";
			linkbox.style.opacity = "0";
			*/
			linkbox.style.display = 'block';
			/*document.container.className='my30_fade';*/ 
			opacity(mytarget, 99, 100, 60);
			/* iD 2007/1/15 cutting the fading effect for stability first*/
		}
	}
 /*TEMPORARILY SHUTTING THIS OFF*/  

/*Show and hide the content map*/

    function wanscript_showmap(mymap)
	{
		// This to switch the displayed link - bigswap ();		
		    var el = document.getElementById(mymap);
		    if (el != '' )
		    {
		        var myfiltre = document.getElementById('wan_1_content_middle'); /*Make the page dim*/
		        if ( el.style.display == 'block' ) 
			        {
				        el.style.display = 'none';
				        myfiltre.style.opacity = "1";

				        
			        }
                else 
                    {
			        el.style.display = 'block';
			        myfiltre.style.opacity = "0.6";

			        }
	      }	    
	}
	

   function wanscript_showcontrol_showmap(myaction)
	{
		/*This is a function to control the playback of slideshows*/
	}
	
	
	/*Show & Hide just for the quicklinks that DOES NOT dim content*/

function wanscript_shownow(mystuff)
	{
			// This to switch the displayed link - bigswap ();
		var linkbox = document.getElementById(mystuff);	
if (mystuff == "failed_login")
			{// patch to recirect old failed login messages to the new function iD 2007/2/24
				wanscript_failed_login()
			}
			else {
					if ( linkbox.style.display == 'block' ) 
						{
						//setTimeout(linkbox+".style.display = 'none'",1250);
						//opacity(mystuff, 100, 0, 1000);
						linkbox.style.display = 'none';
						}
					else {
							linkbox.style.display = 'block';
						}
			}
	}

function wanscript_failed_login()
		{
			//alert("The content that you have requested will be accessible to you once you login");
			window.location="/fl";
		}
	
	
/*Hide the opposing content - this is the namesis of the show*/
function wanscript_anti_shownow(myotherstuff)
	{
		// This to switch the displayed link - bigswap ();
		var linkbox = document.getElementById(myotherstuff);
		if ( linkbox.style.display == 'block' ) 
			{
				linkbox.style.display = 'none';
			}
	}
