
function getWindowSize() {
/*
	if (navigator.appName.indexOf("Microsoft")!=-1) {
		iWidth = document.clientWidth;
		iHeight =document.clientHeight;
	} else {
		iWidth = window.innerWidth;
		iHeight = window.innerHeight;

	}
*/
	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 { "width" : parseInt(myWidth) , "height" : parseInt(myHeight) };
/*
	if (navigator.appName.indexOf("Microsoft")!=-1) {
		winW = document.body.offsetWidth;
		winH = document.body.offsetHeight;
	} else 	{
			winW = window.innerWidth;
			winH = window.innerHeight;		
	}
*/
	return { "width" : parseInt(winW) , "height" : parseInt(winH) };
}

function isIe() {
	return (navigator.appName.indexOf("Microsoft")!=-1) ? true : false;
}


function SelectElement(select,which) {
	for (var i = 0; i < select.options.length; i++) {          
		if ( select.options[i].value == which )                    
			select.options[i].selected=true;
	}
}


function str_replace( r, w , s){
     return s.split(r).join(w);
}


	function GetSelectText(select) {
		for (var i = 0; i < select.options.length; i++) {          
			if ( select.options[i].selected == true )                    
				return select.options[i].text;
		}
	}


function browserVersion(){
	var browser=navigator.appName
	var b_version=navigator.appVersion
	var version=parseFloat(b_version)

	var ie=false;

	if (browser = "Microsoft Internet Explorer") {
		var arr = navigator.appVersion.split(";");
		for (i =0 ; i< arr.length ; i++ ) {
			if (arr[i].indexOf("MSIE") != "-1") {
				//found it 
				var tmp2 = arr[i].split(" ");
				
				version = parseFloat(tmp2[2]);
			}
		}
		
		ie = true;

	}

	return version;
}


function getAbsolutePos (el) {
	var r = { x: el.offsetLeft, y: el.offsetTop , width: el.offsetWidth, height: el.offsetHeight};
	if (el.offsetParent) {
		var tmp = getAbsolutePos (el.offsetParent);
		r.x += tmp.x;
		r.y += tmp.y;
	}

	return r;
};


function GetRadioValue(select) {
	for (var i = 0; i < select.length; i++) {          
		if ( select[i].checked == true )                    
			return select[i].value;
	}
}

	function GetSelectValue(select) {
		for (var i = 0; i < select.options.length; i++) {          
			if ( select.options[i].selected == true )                    
				return select.options[i].value;
		}
	}

