
function getObject(obj_name) {
	return document.getElementById(obj_name);	
}

function show(obj)
{
	obj.style.display = "";
}

function hide(obj)
{
	obj.style.display = "none";
}

function getCssAttribute(obj, attr) 
{
	var ret_value = null;
	var attrMax = obj.attributes.length;
	for(var j = 0; j < attrMax; j++)
	{
		if(obj.attributes.item(j).nodeName == attr)
		{
			ret_value = obj.attributes.item(j).nodeValue;
		}
	}
	return ret_value;
}

function setCssAttribute(obj, attr, val) 
{
	var attrMax = obj.attributes.length;
	for(var j = 0; j < attrMax; j++)
	{
		if(obj.attributes.item(j).nodeName == attr)
		{
			obj.attributes.item(j).nodeValue = val;
		}
	}
}

function changeCssClass(obj, cls) 
{
	var attrMax = obj.attributes.length;
	for(var j = 0; j < attrMax; j++)
	{
		if(obj.attributes.item(j).nodeName == "class")
		{
			obj.attributes.item(j).nodeValue = cls;
		}
	}
}

// left menu functions
//   onMouseOver='mOver(this)';
function mOver(obj) {
	changeCssClass(obj, "left_menu_dn");	
}
//   onMouseOut='mOut(this)';
function mOut(obj) {
	changeCssClass(obj, "left_menu_up");	
}


function open_bio_window(URL)
  {
    bio_window = window.open("", "bio_window", config="height=350,width=400,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
    bio_window.location = URL.toString();
    bio_window.focus();
  }


function PopWindow(url) {

//	var val = "" + GetCookie("ANNOUNCEMENT");
//	if(val.length == 0) {
		window.open(url,"specialwin","toolbar=no,dependant=yes,resizable=yes,scrollbars=yes,width=640,height=480");
//	}
}

function popUp(url) {
    sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=600,height=450');
    self.name = "mainWin"; 
}

function GetCookie (name) {  
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) {    
		var j = i + alen;    
		if (document.cookie.substring(i, j) == arg)      
			return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;    
		if (i == 0) break;   
	}  
	return null;
}
function SetCookie (name, value) {  
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
		((path == null) ? "" : ("; path=" + path)) +  
		((domain == null) ? "" : ("; domain=" + domain)) +    
		((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {  
	var exp = new Date();  
	Exp.setTime (exp.getTime() - 1);  
	var cval = GetCookie (name);  
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

