//smk_faq.js file from version: Mootools Suite v1.1p3 bug-fix:1

function addObjEvent(obj, evType, fn){
	if (obj.addEventListener){
		obj.addEventListener(evType, fn, false);
		return true;
	} else if (obj.attachEvent){
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	} else {
		return false;
	}
}

/*	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/>
	modded slightly by weaver to only create one <style> tag for all calls of this function
*/

var createStyleRuleTagLocation;

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
	
	if(!createStyleRuleTagLocation){
		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) {
			createStyleRuleTagLocation = document.styleSheets[document.styleSheets.length - 1];
		}
	}
	if (createStyleRuleTagLocation && typeof(createStyleRuleTagLocation.addRule) == "object") { // bugs in IE/Mac and Safari
		createStyleRuleTagLocation.addRule(selector, declaration);
	}
}

function fadeOnLoad(id,Dur,Trans,Del){
	try{
		(function(){
			$E('#'+id).effects({duration: Dur, transition: Trans, wait:true}).custom({'opacity': [0, 1]});
		}).delay(Del);
	}
	catch(er){
		createStyleRule('#'+id, 'visibility: visible;');
	}
}

function slideOnLoad(id,Dur,Trans,Del,M){
	try{
		(function(){
			$E('#'+id).effects({duration: Dur, transition: Trans, wait:true}).custom({'margin-left': [((M[3]!=0)?M[3]:0),0], 'margin-right':[((M[1]!=0)?M[1]:0),0],'margin-top': [((M[0]!=0)?M[0]:0),0], 'margin-bottom':[((M[2]!=0)?M[2]:0),0]});
		}).delay(Del);
	}
	catch(er){
		createStyleRule('#'+id, 'margin: 0px;');
	}
}

Fx.Transitions.flicker = function(t, b, c, d){
	var thold = t/d;
	if((t%2)>0){
		return ((thold<.5)?b:b+c);
	}else{
		return ((thold>Math.random())?b+c:b);
	}
};


