/*==================================================
	First Loading
==================================================*/

function addEvent(func){
  if(window.addEventListener){
    window.addEventListener("load",func,false);
  }else if(window.attachEvent){
    window.attachEvent("onload",func);
  }
}


/*==================================================
	Add Event
==================================================*/
addEvent(function(){ currentNav() });


/*==================================================
	Function
==================================================*/

/* Current Nav Display & Roll Over
--------------------------------------------------*/
function currentNav(){
	if(!document.getElementById('str-sub')) return false;
	var aObj=document.getElementById('str-sub').getElementsByTagName('a');
	
	for(i=0;i<aObj.length;i++){
		var txtObj=aObj[i].childNodes[0];

		txtObj.onmouseover=function(){
			if(this.getAttribute('src').indexOf('_o.gif')==-1){
				this.setAttribute('src',this.getAttribute('src').replace('.gif', '_o.gif'));
			}
		}
		txtObj.onmouseout=function(){
			if(this.getAttribute('src').indexOf('_o.gif')>=0){
				this.setAttribute('src',this.getAttribute('src').replace('_o.gif', '.gif'));
			}
		}
		if(document.location.href.indexOf(aObj[i].href)>=0) {
			txtObj.setAttribute('src',txtObj.getAttribute('src').replace('.gif', '_o.gif'));
			txtObj.onmouseout=function(){
				this.setAttribute('src',this.getAttribute('src').replace('_o.gif', '_o.gif'));
			}
		}
	}
	if(document.location.pathname=="/") {
		aObj[6].childNodes[0].setAttribute('src',aObj[6].childNodes[0].getAttribute('src').replace('.gif', '_o.gif'));
		aObj[6].childNodes[0].onmouseout=function(){
			this.setAttribute('src',this.getAttribute('src').replace('_o.gif', '_o.gif'));
		}
	}
}




