// JavaScript Document

var agt = navigator.userAgent.toLowerCase(); 

var is_os = "";
if      ( agt.indexOf("win") != -1)	is_os = "win";
else if ( agt.indexOf("mac") != -1)	is_os = "mac";
else								is_os = "other";

var is_browser = "";
if      ( agt.indexOf("gecko/") != -1)	is_browser = "gecko";
else if ( agt.indexOf("safari") != -1)	is_browser = "safari";
else if ( agt.indexOf("opera" ) != -1)	is_browser = "opera";
else if ( agt.indexOf("msie"  ) != -1)	is_browser = "ie";
else									is_browser = "other";

/*
function schedule_open( url ) {
	
	//os mac
	if (is_os == "mac") {

		//mac_safari
		if (is_browser == "safari") {
		window.open( url,'schedule','scrollbars=0, resizable=0, width=810, height=810' )
		
		//mac_opera
		} else if (is_browser == "opera") {
		window.open( url,'schedule','scrollbars=0, resizable=0, width=810, height=705' )

		//mac_gecko
		} else if (is_browser == "gecko") {
		window.open( url,'schedule','scrollbars=0, resizable=0, width=810, height=705' )
		
		//mac_other
		} else if (is_browser == "other") {
		window.open( url,'schedule','scrollbars=0, resizable=0, width=810, height=705' )
		}
		
	} else if (is_os == "win") {
		
		if (is_browser == "ie") {
		window.open( url,'schedule','scrollbars=0, resizable=0, width=810, height=705' )
		
		//mac_opera
		} else if (is_browser == "gecko") {
		window.open( url,'schedule','scrollbars=0, resizable=0, width=810, height=745' )
		}
	}
}
*/
/*
function schedule_open( url ) {
	
	//os mac
	if (is_os == "mac") {

		//mac_safari
		if (is_browser == "safari") {
		window.open( url,'schedule','scrollbars=1, resizable=0, width=840' )
		
		//mac_opera
		} else if (is_browser == "opera") {
		window.open( url,'schedule','scrollbars=1, resizable=0, width=840' )

		//mac_gecko
		} else if (is_browser == "gecko") {
		window.open( url,'schedule','scrollbars=1, resizable=0, width=840' )
		
		//mac_other
		} else if (is_browser == "other") {
		window.open( url,'schedule','scrollbars=1, resizable=0, width=840' )
		}
		
	} else if (is_os == "win") {
		
		if (is_browser == "ie") {
		window.open( url,'schedule','scrollbars=1, resizable=0, width=840' )
		
		//mac_opera
		} else if (is_browser == "gecko") {
		window.open( url,'schedule','scrollbars=1, resizable=0, width=840' )
		}
	}
}
*/

function schedule_open( url ) {
		window.open( url,'schedule','scrollbars=1, resizable=0, width=840' )
}

function profile_open( url ) {
	window.open( url,'profile','scrollbars=1, resizable=0, width=780, height=360')
}

function news_open( url ) {
	window.open( url,'news','scrollbars=1, resizable=0, width=780, height=500')
}


//Sub menu indication
function indication( submenu_id ) { document.getElementById( submenu_id ).style.visibility="visible" }

//Sub menu no indication
function noindication( submenu_id ) { document.getElementById( submenu_id ).style.visibility="hidden" }


// 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."));
				}
			}
		}
	}
}

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


// window Close
function CloseCoWin() {
    window.close();
}

