function show(tagid)
{

    tag = document.getElementById(tagid);
    
    if(tag.className == "hidden")
    {
        tag.className = "visible";
    }
    else
    {
        tag.className = "hidden";
    }
    
    return false;
}
function expand(tagid)
{
    tag = document.getElementById(tagid);
    
    if(tag.className == "notExpanded")
    {
        tag.className = "";
    }
    else
    {
        tag.className = "notExpanded";
    }
    
    return false;
}
function showMenu(tabid, tagid)
{
    
    menutag = document.getElementById("menu");
    legend = menutag.getElementsByTagName("legend");           
    
    for(i=0;i<legend.length;i++)
    {
        legend[i].className = "";
    }
    
    currTab = document.getElementById(tabid);
    currTab.className = "current";
    
    
    ul = menutag.getElementsByTagName("ul");
    
    for(i=0;i<ul.length;i++)
    {
        //if(ul[i].className == "visible")
        //{
            ul[i].className = "";
        //}
    }
    
    if(tagid.length > 0)
    {
        selected = document.getElementById(tagid);
        selected.className = "visible";
    }
            
 }

function changeImg(tag, url)
{
    imgTag = document.getElementById(tag);
    imgTag.src = url;
}
function openWin(url, e, width, height)
{
    var left = e.screenX - 50;
	var top = e.screenY - 50;

	var win = window.open(url,"_new_win","resizable=yes,"+
				"scrollbars=yes,toolbars=no,menubar=no,width=" + width + ",height=" + height + ",top=" + top + ", left=" + left + " ");
	
}

function CheckLength(sender, args)
{   
        if (args.Value.length < 6) 
        {
             args.IsValid = false;
                return;
        }

        args.IsValid = true;
  
}
function doFocus(id)
{
    tag = document.getElementById(id);
    alert(tag);
    tag.focus();
}
function getScreenInfo()
{
    x = document.getElementById("ctl00_CntMain_txtScreenX");
    y = document.getElementById("ctl00_CntMain_txtScreenY");

    if(x!=null)
    {
        x.value = screen.width;
        y.value = screen.height;
    }
}
