<!--

// Contains scripts to make various functions work regardless of browser type

var isOpera = (navigator.userAgent.indexOf('Opera') != -1);
var isIE = (!isOpera && navigator.userAgent.indexOf('MSIE') != -1);

//Show object
function show(obj) {
   // general function
   if (isIE) {
      // Internet explorer ONLY understands "visible"
      // IE will halt on anything else...
      show = showIE;
   }
   else
   {
      // Netscape understands "show"
      // Mozilla 0.9.9 wants "visible";
      // both browsers don't care about each other's setting
      show = showNS;
   };
   show(obj);
};

function showIE(obj) {
	obj.style.visibility = "visible";
};

function showNS(obj) {
	obj.style.visibility = "show";
	obj.style.visibility = "visible";
};

//Hide object
function hide(obj) {
   // general function
   if (isIE) {
      // Internet explorer ONLY understands "hidden"
      // IE will halt on anything else...
      hide = hideIE;
   }
   else
   {
      // Netscape understands "hide"
      // Mozilla 0.9.9 wants "hidden";
      //both browsers don't care about each other's setting
      hide = hideNS;
   };
   hide(obj);
};

function hideIE(obj) {
	obj.style.visibility = "hidden";
};

function hideNS(obj) {
	obj.style.visibility = "hide";
	obj.style.visibility = "hidden";
};

// Disable a form/item
function disable(obj) {
	if(typeof obj != 'undefined') {
		var sChild = obj.children;
		if(sChild.length > 0) {
			for(var iCount=0; iCount < sChild.length; iCount++) {
				disableelement(sChild(iCount));
			};
		};
		disableelement(obj);
/*
		if (obj.nodeName == "FORM") {
			// Disable each element on the form
			var iCount = 0;
			while(typeof obj.elements[iCount] != "undefined") {
				disableelement(obj.elements[iCount]);
				iCount++;
			};
//			stop;
		}
		else
		{
			// Just disable this element
			disableelement(obj);
		};
*/
	};
};

function disableelement(element) {
	// Disables an element
	element.disabled=true;
};

// Enable a form/item
function enable(obj) {
	if(typeof obj != 'undefined') {
		if(obj != null) {
			var sChild = obj.children;
			if(sChild.length > 0) {
				for(var iCount=0; iCount < sChild.length; iCount++) {
					enableelement(sChild(iCount));
				};
			};
			enableelement(obj);
		};
	};
};

function enableelement(element) {
	// Enable a specific element
	element.disabled=false;
};

function GetScreenWidth() {
	// Returns current screen available width in pixels
};

function GetScreenHeight() {
	// Returns current screen available height in pixels
};

function getWinSize() {

	var sScreen = screen;
	if(document.all) {
		// Internet Explorer	
		getWinSize = wsq1;
		
		if (! document.body.scrollWidth) {
			//Operaspecific: Opera in the Internet mode
			// doesn't understand scrollWidth/scrollHeight,
			// but clientWidth gives the scrollWidth... 
			getWinSize = wsq2;
		};

	} 
	else if(document.layers) {
		// Netscape??
		getWinSize = wsq3;
	}
	else if (document.getElementById) {
		
		if (document.height) {
			// Netscape 6 & Mozilla 1
			getWinSize = wsq3;
		}
	
		// For Opera & Opera in Mozilla mode:
		else if (document.body.offsetWidth) {
			getWinSize = wsq5;
		}
		
	}
	//alert(getWinSize);		
	getWinSize();
};

//-->