// JavaScript Document
// JavaScript Document

//browser detection
var ns4 = document.layers;
var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1) 
	||(navigator.userAgent.indexOf("Opera/5")!=-1);
var op6 = (navigator.userAgent.indexOf("Opera 6")!=-1) 
	||(navigator.userAgent.indexOf("Opera/6")!=-1);
var agt=navigator.userAgent.toLowerCase();
var mac = (agt.indexOf("mac")!=-1);
var ie = (agt.indexOf("msie") != -1); 
var mac_ie = mac && ie;

//size functions
	function windowWidth()
	{  if( typeof( window.innerWidth ) == 'number' )
		{	//Non-ie
			return window.innerWidth;
		}
		else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		{	//ie 6+ in 'standards compliant mode'
			return document.documentElement.clientWidth;
		}
		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		{	//ie 4 compatible
			return document.body.clientWidth;
		}
	}
	function windowHeight()
	{	if( typeof( window.innerWidth ) == 'number' )
		{	//Non-ie
			return window.innerHeight;
		}
		else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		{	//ie 6+ in 'standards compliant mode'
			return document.documentElement.clientHeight;
		}
		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		{	//ie 4 compatible
			return document.body.clientHeight;
		}
		return false;
	}
	function getElementHeight(Elem) {
		if (ns4) {
			var elem = getObjNN4(document, Elem);
			return elem.clip.height;
		} else {
			if(document.getElementById) {
				var elem = document.getElementById(Elem);
			} else if (document.all){
				var elem = document.all[Elem];
			}
			if (op5) { 
				xPos = elem.style.pixelHeight;
			} else {
				xPos = elem.offsetHeight;
			}
			return xPos;
		} 
	}
	
	function getElementWidth(Elem) {
		if (ns4) {
			var elem = getObjNN4(document, Elem);
			return elem.clip.width;
		} else {
			if(document.getElementById) {
				var elem = document.getElementById(Elem);
			} else if (document.all){
				var elem = document.all[Elem];
			}
			if (op5) {
				xPos = elem.style.pixelWidth;
			} else {
				xPos = elem.offsetWidth;
			}
			return xPos;
		}
	}

//code for resizing

	var windowW = 0;
	var windowH = 0;
	var windowWwas = 0;
	var windowHwas = 0;

