// JavaScript Document
// author: Christopher E. Walker
// date: September, 2005



function getElementsByAttributeValue(attName, attValue, containingObject) {
		if (containingObject == undefined) {
			containingObject = document.getElementsByTagName("body")[0];
		}
		// this method only searches with the BODY tag
		// if the containing element is not passed as an object
		// ! the containing tag will not be returned in the array!
		var elementList = new Array();
		var children = containingObject.getElementsByTagName("*");
		var child;
		for(var i=0; i<children.length; i++) {
			// is it really an Element, IE seems also to select comments
			child = children[i];
			if (child.nodeType == 1) {
				if (child.getAttribute(attName) == attValue) {
					elementList.push(child);
				}
			}
		}
		return elementList;
}
// ======================================================


// add this method to the document object - native HTML DOM?

// make this inherited from the native Document object, and then
// will it be inherited by others down the line (like Element) so that
// I don't have to include 'this' in the attribute list?
function setAttrAndProp(ownerNode, sName, sValue) {
	ownerNode.setAttribute(sName, sValue);
	eval("ownerNode."+sName+"=sValue;");
	return true; // was successful
};

// got this somewhere else
// ======================================================
		var viewport = {
  		getWinWidth: function () {
			this.width = 0;
			if (window.innerWidth) this.width = window.innerWidth - 18;
			else if (document.documentElement && document.documentElement.clientWidth) 
			this.width = document.documentElement.clientWidth;
			 else if (document.body && document.body.clientWidth) 
			this.width = document.body.clientWidth;
  		},
  
		getWinHeight: function () {
			this.height = 0;
			if (window.innerHeight) this.height = window.innerHeight - 18;
			else if (document.documentElement && document.documentElement.clientHeight) 
			this.height = document.documentElement.clientHeight;
			else if (document.body && document.body.clientHeight) 
			this.height = document.body.clientHeight;
  		},
  
  		getScrollX: function () {
   		 this.scrollX = 0;
			if (typeof window.pageXOffset == "number") this.scrollX = window.pageXOffset;
			else if (document.documentElement && document.documentElement.scrollLeft)
			this.scrollX = document.documentElement.scrollLeft;
			else if (document.body && document.body.scrollLeft) 
			this.scrollX = document.body.scrollLeft; 
			else if (window.scrollX) this.scrollX = window.scrollX;
  		},
  
  	getScrollY: function () {
			this.scrollY = 0;    
			if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
			else if (document.documentElement && document.documentElement.scrollTop)
			this.scrollY = document.documentElement.scrollTop;
			else if (document.body && document.body.scrollTop) 
			this.scrollY = document.body.scrollTop; 
			else if (window.scrollY) this.scrollY = window.scrollY;
 	 },
  
  	getAll: function () {
		this.getWinWidth(); this.getWinHeight();
		this.getScrollX();  this.getScrollY();
  	}
}
		function setIframe(h) {
  			var theIframe = document.getElementById? document.getElementById('ifrm'): document.all? document.all['ifrm']: null;
  			if (theIframe) {
				viewport.getWinHeight();
				 //  both theIframe.height and theIframe.style.height seem to work 
				theIframe.style.height = (viewport.height - 65) + "px";
				 // theIframe.style.marginTop = Math.round( (viewport.height - parseInt(theIframe.style.height) )/2 ) + "px";
  			};
		};
		// for sizing and positioning the iframe in the window
		// .5 for height="50%"
		function setIframeNow(ht){
			setIframe(ht);
			window.onresize = function() { setIframe(ht) };
		};
//=== cookie functions 

var cookie = "Monster";