function showhide(id)
{ 
    id = document.getElementById(id); 

    if(ID.style.display == "") 
    id.style.display = "none"; 
    else 
    id.style.display = ""; 


}

function ShowHideList(target)
{ 
   var charsWrapper = document.getElementById('chars');
   var childrenDivs = charsWrapper.getElementsByTagName('div');
   
   for (var i=0;i< childrenDivs.length;i++)
		{
		    var currItem = childrenDivs[i];
		    
		    if (currItem.id == target )
		    {
			    currItem.style.display = "block";
			    
			}    
			else
			    currItem.style.display="none";
		}
  
}

function IncreaseSize()
{
    document.body.style.fontSize = '78%';
    try
    {
        id("divContent").style.fontSize = '125%';
    }
    catch(e)
    {}
    /*if (!hasClass(child('nav_primary', 'ul'), 'mod'))
    {
        addClass(child('nav_primary', 'ul'), 'mod');
    }*/
    id("imgIncreaseSize").src = "/global/img/icn_text_larger_disabled.gif";
    id("imgDecreaseSize").src = "/global/img/icn_text_smaller.gif";
}

function DecreaseSize()
{
    document.body.style.fontSize = '78%';
    try
    {
        id("divContent").style.fontSize = '100%';
    }
    catch(e)
    {}
    /*if (!hasClass(child('nav_primary', 'ul'), 'mod'))
    {
        addClass(child('nav_primary', 'ul'), 'mod');
    }*/
    id("imgIncreaseSize").src = "/global/img/icn_text_larger.gif";
    id("imgDecreaseSize").src = "/global/img/icn_text_smaller_disabled.gif";
}

function FindInformation(selSelectObject)
{
   if (selSelectObject.options[selSelectObject.selectedIndex].value != "")
   {
     location.href=selSelectObject.options[selSelectObject.selectedIndex].value
   }
}

function RadComboBox1_OnClientSelectedIndexChanged(item)
{
    try
    {
        location.href = item.Value;
    }
    catch(e){}
}

function id(id) {return document.getElementById(id);}
function addClass(t,c){var p=new RegExp("(^| )"+c+"( |$)");if(!p.test(t.className)){if(t.className =="")t.className=c;else t.className+=" "+c;}return true;}
function removeClass(t,c){var r=t.className;var p=new RegExp("(^| )"+c+"( |$)");r=r.replace(p,"$1");r=r.replace(/ $/,"");t.className=r;return true;}
function hasClass(t,c){var p=new RegExp("(^| )"+c+"( |$)");return p.test(t.className);}
function ieVersion(){ieVersion=-1;if(navigator.appVersion.indexOf("MSIE")!=-1){var tempNavigatorString=navigator.appVersion.split("MSIE");ieVersion=parseFloat(tempNavigatorString[1]);}	return ieVersion;}
function child(idName,tagName){return id(idName).getElementsByTagName(tagName)[0];}

function addToFavorites(pageName) 
{ 
    window.external.AddFavorite(location.href, pageName);
}

function CreateBookmarkLink(pageName) {
    title=pageName; 
    url=location.href;
    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(title, url,"");
    } else if( window.external ) { // IE Favorite
        window.external.AddFavorite( url, title); }
    else if(window.opera && window.print) { // Opera Hotlist
        return true; }
}

function GetObject(/*element id*/id, /*html tag, e.g. div*/type)
{
	var aObjects = document.getElementsByTagName(type);
	var retvalue = null;
	for (var i = 0; i < aObjects.length; i++)
	{
		var o = aObjects[i];
		if (-1 != o.id.indexOf(id))
		{
			retvalue = o;
			break;
		}
	}
	aObjects = null;
	return retvalue;
}
     
function f_open_window_max( aURL, aWinName )
{

	if (window.name != aWinName) 
	{
	
		var width = 640,height = 480;

		if (window.screen)
		{

			width = screen.availWidth;
			height = screen.availHeight;
		} 

		window.open(aURL,'aWinName','width=' + width + ',height=' + height + ',scrollbars=yes,screenX=0,screenY=0,top=0,left=0');
	}
}

function doPrint()
{
    window.print();
}

function PrintCalculator()
{
    id('aPrintPage').click();
}

function OnAfterInit()
{
    try
    {
        GetObject("RadComboBox1_Input", "input").style.height = '18px';
    }
    catch(e)
    {}
    try
    {
        var o = GetObject("RadComboBox2_Input", "input");
        o.style.height = '12px';
        o.style.width = '232px';
        o = GetObject("RadComboBox2_Image", "img");
        o.src = '/global/img/btn_submit_arrow_white_bg.gif';
    }
    catch(e)
    {}
    try
    {
        var o = GetObject("RadComboBox3_Input", "input");
        o.style.height = '12px';
        //o.style.width = '220px';
        o = GetObject("RadComboBox3_Image", "img");
        o.src = '/global/img/btn_submit_arrow_white_bg.gif';
    }
    catch(e)
    {}
}
