
function GetParamValue(name) {
	if ( !(window.location)) 
		return ""
	name += "="
	var nPos1 = window.location.href.indexOf(name)
	if (nPos1 < 0) 
		return ""
	var nPos2 = window.location.href.indexOf("&", nPos1)
	return unescape( nPos2 >= nPos1  ? 
			window.location.href.substring(nPos1 + name.length, nPos2) :
			window.location.href.substring(nPos1 + name.length))
}

function MM_openBrWindow(url,winName,features) {
if (url != "")
  window.open(url,winName,features);
}

function changeBar(obj) {
	var currentTime = new Date();
	var bogus2 = currentTime.getTime();
	i = obj.topicBar.selectedIndex;
	val = obj.topicBar.options[i].value;
	if(val != null && val != "")
	{
		var vl = val.split(":");
                                if(vl.length==3) {
			self.location = "art_main.cfm?sec_id="+vl[2]+"&art_id=" + vl[1];
                                }
		else if (vl[0] == 't') {
			
			var sec_id = GetParamValue("sec_id");
			var sec_str="";

			if(sec_id.length>0)
			   var sec_str="&sec_id="+sec_id;
			
			self.location = "art_main.cfm?art_id=" + vl[1]+sec_str;
		} else {
			self.location = "sec_main.cfm?sec_id=" + vl[1];
		}
	}
}


function setCookie(name,value,expires) {
	document.cookie = name + "=" + escape(value) + ";path=/" + ((expires == null)? " " : "; expires=" + expires.toGMTString());
}

function createCookie(val) {
    var exp = new Date();
    exp.setTime(exp.getTime() + (1000*60*60*1*1));
    setCookie("fontsize",val,exp);
    document.location.reload();
}

