
//moo.smk.js file from version: 2.2.6

function mooArrayCheck(myArray,myId){
	for(var i in myArray){
		if(myArray[i].id == myId){
			return myArray[i];
		}
	}
}

function smkShowHide(smkItem,hide){
	if (document.getElementById){
		// this is the way the standards work
		var style2 = document.getElementById(smkItem).style;
		if(hide){style2.height = "0px"; return true;}
		style2.height = style2.height == "0px"? "auto":"0px";
	}else if (document.all){
		// this is the way old msie versions work
		var style2 = document.all[smkItem].style;
		if(hide){style2.height = "0px"; return true;}
			style2.height = style2.height == "0px"? "auto":"0px";
		}
	else if (document.layers){
	   // this is the way nn4 works
		var style2 = document.layers[smkItem].style;
		if(hide){style2.height = "0px"; return true;}
			style2.height = style2.height == "0px"? "auto":"0px";
		}
}


function smkShowHideDisplay(smkItem,hide){
	if (document.getElementById){
		// this is the way the standards work
		var style2 = document.getElementById(smkItem).style;
		if(hide){style2.display = "none"; return true;}
		style2.display = style2.display == "none"? "block":"none";
	}else if (document.all){
		// this is the way old msie versions work
		var style2 = document.all[smkItem].style;
		if(hide){style2.display = "none"; return true;}
		style2.display = style2.display == "none"? "block":"none";
	}
	else if (document.layers){
	   // this is the way nn4 works
		var style2 = document.layers[smkItem].style;
		if(hide){style2.display = "none"; return true;}
		style2.display = style2.display == "none"? "block":"none";
	}
}

/*	dynamicCSS.js v1.0 <http://www.bobbyvandersluis.com/articles/dynamicCSS.php>	Copyright 2005 Bobby van der Sluis	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>*/function createStyleRule(selector, declaration) {	if (!document.getElementsByTagName || !(document.createElement || document.createElementNS)) return;	var agt = navigator.userAgent.toLowerCase();	var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));	var is_iewin = (is_ie && (agt.indexOf("win") != -1));	var is_iemac = (is_ie && (agt.indexOf("mac") != -1));	if (is_iemac) return; // script doesn't work properly in IE/Mac	var head = document.getElementsByTagName("head")[0]; 	var style = (typeof document.createElementNS != "undefined") ?  document.createElementNS("http://www.w3.org/1999/xhtml", "style") : document.createElement("style");	if (!is_iewin) {		var styleRule = document.createTextNode(selector + " {" + declaration + "}");		style.appendChild(styleRule); // bugs in IE/Win	}	style.setAttribute("type", "text/css");	style.setAttribute("media", "screen"); 	head.appendChild(style);	if (is_iewin && document.styleSheets && document.styleSheets.length > 0) {		var lastStyle = document.styleSheets[document.styleSheets.length - 1];		if (typeof lastStyle.addRule == "object") { // bugs in IE/Mac and Safari			lastStyle.addRule(selector, declaration);		}	}}

function smkDocumentWrite(id,tag,content,attributeArray,newLine){
	if(document.getElementById){		var myPos = document.getElementById(id);
		var myTag = (typeof document.createElementNS != "undefined") ?  document.createElementNS("http://www.w3.org/1999/xhtml", "span") : document.createElement("span");
		//add loop for attributes
		
		var myContent = document.createTextNode(content);
		
		myTag.appendChild(myContent);
		
		var myHtml = myPos.appendChild(myTag);
		
		if(newLine){
			var myBR = (typeof document.createElementNS != "undefined") ?  document.createElementNS("http://www.w3.org/1999/xhtml", "br") : document.createElement("br");
			myPos.insertBefore(myBR,myHtml);
		}
	}
}

