﻿var bwsr=new Array();

function bsr(){
var info=new Array();
agent=navigator.userAgent;
ver=navigator.appVersion;
v=(ver.indexOf("MSIE 6")>0)?"IE 6.":(ver.indexOf("MSIE 7")>0)?"IE 7.":(ver.indexOf("MSIE 8")>0)?"IE 8.":(ver.indexOf("MSIE 9")>0)?"IE 9.":ver;
info['v']=v;
info['a']=(agent.indexOf("MSIE ")>0)?"IE":(agent.indexOf("Gecko")>0)?"Fx":"";
info['dom']=(document.getElementById) ? 1 : 0;
return info;
}

bwsr=bsr();

var mystyle=new Array();
function menu_over(e){
	//mystyle['background']=e.style.background;
	mystyle['color']=e.style.color;
	//e.style.background='#ffffff';
	e.style.color='#FFCC00';
	//alert(mystyle['background']);
}
function menu_out(e){
	//e.style.background=mystyle['background'];
	e.style.color=mystyle['color'];
}

function getScreenSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return  [myWidth,myHeight];
}
function getScrollingPosition(){
	var position = [0, 0];
	if (typeof window.pageYOffset != 'undefined'){
		position = [window.pageXOffset,window.pageYOffset];
	}else if (typeof document.documentElement.scrollTop!= 'undefined' && document.documentElement.scrollTop > 0){
		position = [document.documentElement.scrollLeft,document.documentElement.scrollTop];
	}else if (typeof document.body.scrollTop != 'undefined'){
		position = [document.body.scrollLeft,document.body.scrollTop];
	}
	return position;
}

