new function(){
	
	// Rollover
	function smartRollover() {
		if(document.getElementsByTagName) {
			var images = document.getElementsByTagName("img");
	
			for(var i=0; i < images.length; i++) {
				if(images[i].getAttribute("src").match("_off."))
				{
					images[i].onmouseover = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
					}
					images[i].onmouseout = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
					}
				}
			}
		}
	}
	
	// _blank
	function setBlank(windowonload) {
		var r1 = new RegExp ("external(=(\S+))?","i"),
			r2 = new RegExp ("^_+(\S+)$", "i"),
		r3 = new RegExp ("^(blank|self|parent|top)$", "i");
		if (document.getElementsByTagName)
		{
			var anchors = document.getElementsByTagName ('a'),
				affix   = 0,
				count   = anchors.length,
				anchor, target, t;
				while (count > affix)
		              if ((anchor = anchors [affix ++]).getAttribute ('href') || anchor.href)
		                  if (r1.test (anchor.getAttribute ('rel') || anchor.rel || ""))
		                      (target = (target = RegExp.$2)
		                          ? (r2.test (target)
		                              ? (r3.test (t = RegExp.$1)
		                                  ? "_" + t
		                                  : t)
		                              : target)
		                          : "_brank"),
		                      ((anchor.setAttribute)
		                        ? anchor.setAttribute ("target", target)
		                        : (anchor.target = target));
		}
		if (windowonload && windowonload.apply)
		        windowonload.apply (this, arguments);
    }

	//popup
	function setPopup() {
		var node_a = document.getElementsByTagName("a");
			for (var i in node_a) {
				if (node_a[i].className == "popup") {
					node_a[i].onclick = function() {
						return winOpen(this.href)
					};
				}
			}
	};
	
	function addEvent(elm,listener,fn){
		try{
			elm.addEventListener(listener,fn,false);
		}catch(e){
			elm.attachEvent("on"+listener,fn);
		}
	}
	addEvent(window,"load",smartRollover);
	addEvent(window,"load",setBlank);
	addEvent(window,"load",setPopup);
}


//gnavigation
function MenuOn(x){ 
    obj=document.getElementById("submenu"+x).style.visibility="visible";
}
function MenuOff(x){ 
    obj=document.getElementById("submenu"+x).style.visibility="hidden"; 
}


//popup
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

