// browser detect
	function checkBrowser(){
		this.ver=navigator.appVersion
		this.dom=document.getElementById?1:0
		this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
		this.ie4=(document.all && !this.dom)?1:0;
		this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
		this.ns4=(document.layers && !this.dom)?1:0;
		//added
		this.ie4mac=this.ie4 && navigator.userAgent.indexOf("Mac")>-1
		this.ie5mac=this.ie5 && navigator.userAgent.indexOf("Mac")>-1
		this.ie55=(this.ver.indexOf("MSIE 5.5")>-1 && this.dom)?1:0; 
		this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ie5mac)
		return this
	}
	bw=new checkBrowser()

	function barOver(title) {
	  title.style.backgroundColor = "#EAEFF2";
	}
	
	function barOut(title) {
	  title.style.backgroundColor = "#F4F6F8";
	}

//Shows the div
	function show(div,nest){
		obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
		obj.visibility='visible'
	}
//Hides the div
	function hide(div,nest){
		obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
		obj.visibility='hidden'
	}
	
	function open_calendar() {
		show('calendar');show('calendar_bg');show('calendar_min'); 
		hide('calendar_expand'); 
	}
	
	function close_calendar() {
		hide('calendar');hide('calendar_bg');hide('calendar_min');
		show('calendar_expand'); 
	}
	
	function submitPowwow() {
		show('powwow');hide('powwow_archived');
		hide('public_nav');show('back2powwow');
	}
	
	function commentPowwow() {
		parent.hide('public_nav');parent.hide('news');parent.hide('news_archived');parent.hide('news_nav');parent.show('back2powwow2');parent.hide('news_en');
	}
	
	function oldPowwow() {
		hide('powwow');show('powwow_archived');
	}
	
	function refreshPowwow() {
		hide('powwow_archived');show('powwow');
	}
	
	function back2powwow() {
		hide('back2powwow');show('public_nav');
		show('powwow');hide('powwow_archived');
		//iframe2.frames['newsbox'].location.href='../news/ch_news.asp';
	}
	
	function back2powwow2() {
		hide('back2powwow2');show('public_nav');
		show('powwow');hide('powwow_archived');
		show('news_nav');show('news');
		iframe2.frames['newsbox'].location.href='../news/ch_news.asp';
	}
	
	function back2powwow3() {
		parent.hide('back2powwow2');parent.show('public_nav');
		parent.show('powwow');parent.hide('powwow_archived');
		parent.show('news_nav');parent.show('news');
		iframe2.frames['newsbox'].location.href='../news/ch_news.asp';
	}
	
	function oldNews() {
		hide('news');show('news_archived');hide('news_en');hide('news_ch_en');
	}
	
	function refreshNews() {
		hide('news_archived');show('news');show('news_en');hide('news_ch_en');
	}
	
	function changeLangEn() {
		hide('news_en');show('news_ch_en');
	}
	
	function changeLangCh() {
		hide('news_ch_en');show('news_en');
	}
	
// remove link border 
	function unblur() {
		this.blur();
	}

	function getLinksToBlur() {
		if (!document.getElementBynest) return
		links = document.getElementsByTagName("a");
		for(i=0; i<links.length; i++) {
			links[i].onfocus = unblur
		}
	}		

//if (top == self) self.location.href = "http://www.mousecontrol.net/news/";


function startUp() {
			getLinksToBlur();
			//eventLoader();
		}
		
	window.onload = startUp;		


