/****************************
* FONT RE-SIZE FUNCTION
*	
*	Does page font re-sizing.
****************************/
//createCookie('cierFontSize', 2, 365);
//        eraseCookie('cierFontSize');
//        createCookie('cierFontSize', 1, 365);        

function fontReSize(blnLoad)
{
    blnInContent = false;
    var defaultTextSize = new Array();  //Default Font Sizes:
                      
    defaultTextSize[1] = "1.00em";       // 1.0em - Normal
    defaultTextSize[2] = "1.04em";      // 1.1em - Larger
    defaultTextSize[3] = "1.08em";       // 1.15em - Largest

   
    var currentFontSize = readCookie('cierFontSize');   //Get current cookie font size

    if (currentFontSize == null)
    {
        //Cookie Not Set, Initialize Cookie
        createCookie('cierFontSize', 1, 365);           //Set cookie for a year to default size
        currentFontSize = readCookie('cierFontSize');   //Set Variable Continue on
    }

    if (blnLoad != 1)
    {
    //User Chooses
        
        //currentFontSize = readCookie('cierFontSize');   //Get current cookie font size
        currentFontSize++;  //Increase Font Size
        
        eraseCookie('cierFontSize');
        if (currentFontSize > 3)   
        {
            createCookie('cierFontSize', "1", 365);   //Set cookie for a year to default size
            currentFontSize = 1;        //Set Variable Continue on  
        }
        else
        {
            createCookie('cierFontSize', currentFontSize, 365);   //Set cookie for a year to default size    
        }
	}
	
	
	
    elements = document.getElementsByTagName("*"); 
	
    for(var i=0; i<elements.length; i++)
    {
	    
        if (elements[i].id == 'content')
        {
            blnInContent = true;
        }	    
        if (elements[i].id == 'content-right-column')
        {
            blnInContent = false;
        }
    
        if ( blnInContent == true )
        {
            if (elements[i].tagName == 'P' ||
                elements[i].tagName == 'DIV' ||
                elements[i].tagName == 'A' ||
                elements[i].tagName == 'LI')
            {    
                if (elements[i].tagName != 'IMG')
                {
                    elements[i].style.fontSize =  defaultTextSize[currentFontSize];
                }
            }
        }
    } 
	    
	    
}


function onEnter( evt, frm ) {
    var keyCode = null;

    if( evt.which ) 
    {
        keyCode = evt.which;
    }
    else if( evt.keyCode ) 
     {
        keyCode = evt.keyCode;
    }
    if( 13 == keyCode )
    {
        //Submitted Search
        location.href='/Search.aspx?query=' + document.aspnetForm.s.value;
        return false;
    }
    
}