/***************************************************************************************************************\
// ==JavaScript===
// @name			script.js
// @author			Jerone JS Productions
// @namespace		About Jeroen
// @homepage		http://jervw.freehostia.com
// @description		Common javascripts
// @version			v1
// @copyright		2007
// @browser			IE7, FF2, Opera9, NS9
// @include
// ==/JavaScript==
|***************************************************************************************************************|
ToC:
- Framework.
|***************************************************************************************************************|
THIS  SCRIPT IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES,  INCLUDING, BUT  NOT  LIMITED  TO, THE  IMPLIED  WARRANTIES  OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
EVENT  SHALL  THE  AUTHOR  BE  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER  CAUSED  AND  ON ANY THEORY OF LIABILITY,
WHETHER  IN  CONTRACT, STRICT  LIABILITY, OR  TORT (INCLUDING NEGLIGENCE OR
OTHERWISE)  ARISING  IN  ANY  WAY  OUT  OF  THE USE OF THIS SCRIPT, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\***************************************************************************************************************/


//*** FUNCTIONS FRAMEWORK ***//
////////////////////////////////////////////////////////////////////////////
/** COMMON **/
var $d = document;
var $2D = new Date();
var $now = $2D.getTime();
var $uA = navigator.userAgent.toLowerCase();
function $gi(str){return $d.getElementById(str);};
function $gn(str){return $d.getElementsByName(str)[0];};
function $ce(obj){return $d.createElement(obj);};
function $re(obj){obj.parentNode.removeChild(obj);};
function $ct(str){return $d.createTextNode(str);};
function $ih(obj,HTML){obj.innerHTML=HTML;};
function $sa(obj,attr,val,flag){if(/msie/.test($uA)&&!/opera/.test($uA)){switch(attr){case "class":attr="className";break;case "for":attr="htmlFor";break;case "style":attr="cssText";break;case "float":attr="cssFloat";break;}}obj.setAttribute(attr,val,flag);};
function $ga(obj,attr,flag){if(/msie/.test($uA)&&!/opera/.test($uA)){switch(attr){case "class":attr="className";break;case "for":attr="htmlFor";break;case "style":attr="cssText";break;case "float":attr="cssFloat";break;}}return obj.getAttribute(attr,flag);};
function $ac(obj,nObj){obj.appendChild(nObj);};
function $ia(obj,nObj){return obj.parentNode.insertBefore(nObj,obj.nextSibling);};
function $ib(obj,nObj){return obj.parentNode.insertBefore(nObj,obj);};
function $tn(str){if($d.getElementsByTagName){return $d.getElementsByTagName(str);}else if($d.styleSheets&&$d.all){return $d.all.tags(str);}};
////////////////////////////////////////////////////////////////////////////
/** PROTOTYPE **/
Number.prototype.between=function(min,max){return(min<=this&&this<max);};
String.prototype.htmlEntities=function(){return this.replace(/[^\x09\x0A\x0D\x20-\x7F]|[\x21-\x2F]|[\x3A-\x40]|[\x5B-\x60]/g,function(e){return '&#'+e.charCodeAt(0)+';'});};
String.prototype.trim=function(){return this.replace(/^\s\s*/,'').replace(/\s\s*$/,'');};
String.prototype.strip=function(exp){return this.replace(exp?exp:/\s/g,"");};
Array.prototype.searchArray=function(str,caseInsens,ignoreSpaces){var inArray=false;for(var i=0;i<this.length;i++){if(caseInsens!=false){str=str.toLowerCase();this[i]=this[i].toLowerCase();}if(ignoreSpaces!=false){spaceRegExp=/\s+/g;str=str.replace(spaceRegExp,"");this[i]=this[i].replace(spaceRegExp,"");}if(this[i]==str){inArray=true;break;}}return inArray;};
Array.prototype.find=function(str){var returnArray=false;for(i=0;i<this.length;i++){if(typeof(str)=='function'){if(str.test(this[i])){if(!returnArray){returnArray=[];}returnArray.push(i);}}else{if(this[i]===str){if(!returnArray){returnArray=[];}returnArray.push(i);}}}return returnArray;};
Array.prototype.compare=function(arr){if(this.length!=arr.length)return false;for(var i=0;i<arr.length;i++){if(this[i].compare){if(!this[i].compare(arr[i]))return false;else continue;}if(this[i]!=arr[i])return false;}return true;};
////////////////////////////////////////////////////////////////////////////
/** STYLE **/
function $addCSS(css){var css;if(typeof GM_addStyle!="undefined"){GM_addStyle(css);}else if(typeof addStyle!="undefined"){addStyle(css);}else{var heads=$d.getElementsByTagName("head");if(heads.length>0){var node=$ce("style");node.type="text/css";$ih(node,css);$ac(heads[0],node);}}};
function $getStyle(obj,styleAttr){if(window.getComputedStyle){return $d.defaultView.getComputedStyle(obj,null).getPropertyValue(styleAttr);}else if(obj.currentStyle){return obj.currentStyle[styleAttr];}};
function $setReturnOpacity(n){return opacity="filter:alpha(opacity="+n+");"+"filter:progid:DXImageTransform.Microsoft.Alpha(opacity="+n+");"+"opacity:"+(n/100)+";"+"-moz-opacity:"+(n/100)+";"+"-khtml-opacity:"+(n/100)+";";};
function $setOpacity(obj,n){var obj=obj.style;obj.opacity=(n/100);obj.MozOpacity=(n/100);obj.KhtmlOpacity=(n/100);obj.filter="alpha(opacity="+n+")";obj.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+n+")";};
function $hs(obj,way,riturn){if(riturn){if(way==1){if(obj.style.display=="block"||obj.style.visibility=="visible"||!(obj.style.display=="none"||obj.style.visibility=="hidden")){return true;}else return false;}else if(way==2){if(obj.style.display=="none"||obj.style.visibility=="hidden"){return true;}else return false;}else if(way==3){$alert('',4,'$hs01','There is no toggle return');}}else{if(way==1){obj.style.display="block";obj.style.visibility="visible";}else if(way==2){obj.style.display="none";obj.style.visibility="hidden";}else if(way==3){if(obj.style.display=="none"||obj.style.visibility=="hidden"){obj.style.display="block";obj.style.visibility="visible";}else{obj.style.display="none";obj.style.visibility="hidden";}}}};
function $opacityFadeIn(obj,opacStart,opacEnd,opacTime,opacSteps,functBusy,functFinish){if(opacStart<opacEnd){$setOpacity(obj,opacStart);eval(functBusy);window.setTimeout(function(){opacStart+=(opacSteps);$opacityFadeIn(obj,opacStart,opacEnd,opacTime,opacSteps,functBusy,functFinish)},opacTime);}else if(opacStart>=opacEnd){eval(functFinish);}};
function $opacityFadeOut(obj,opacStart,opacEnd,opacTime,opacSteps,functBusy,functFinish){if(opacStart>opacEnd){$setOpacity(obj,opacStart);eval(functBusy);window.setTimeout(function(){opacStart-=(opacSteps);$opacityFadeOut(obj,opacStart,opacEnd,opacTime,opacSteps,functBusy,functFinish)},opacTime);}else if(opacStart<=opacEnd){eval(functFinish);}};
////////////////////////////////////////////////////////////////////////////
/** INFORMATION **/
function $meaSureMentWindow(way){var way=way.toUpperCase();if(way=='H'){if(window.innerHeight){return window.innerHeight;}if($d.documentElement&&$d.documentElement.clientHeight){return $d.documentElement.clientHeight;}if($d.body){return $d.body.clientHeight;}else return 1000;}if(way=='W'){if(window.innerWidth){return window.innerWidth;}if($d.documentElement&&$d.documentElement.clientWidth){return $d.documentElement.clientWidth;}if($d.body){return $d.body.clientWidth;}else return 1000;}else if(way==''){return 1000;}};
var detectDoctype=(function(){var regDTD=/\/\/DTD/gi;var regAll=/(\w*)\/\/DTD\s+(\w+)\s+([a-zA-Z]*)\s*([\d\.]+)\s*(.+[^\s*])*\s*\/\/\s*(\w*)/gi;var regPlus=/plus\s+/gi;var regPar1=/(\w*)\/\/DTD\s+([^\/]+)*\/\/\s*(\w*)/gi;var regPar2=/(\w*)\s+([a-zA-Z]*)\s*([\d\.]*)\s*(\w*)/gi;doctype=[];doctype.maker=null;doctype.host=null;doctype.hostLong=null;doctype.hostLongArray=null;doctype.version=null;doctype.importance=null;doctype.language=null;if(document.doctype){identifier=document.doctype.publicId;}else{identifier=null;}identifier0=regDTD.test(identifier);identifier1=regAll.test(identifier);identifier2=regPlus.test(identifier);if(identifier0){if(identifier1){if(identifier2){regPar1.test(testDov);doctype.maker=RegExp.$1?RegExp.$1:null;doctype.hostLong=RegExp.$2?RegExp.$2:null;doctype.host=new Array();doctype.version=new Array();doctype.importance=new Array();doctype.hostLongArray=new Array();doctype.language=RegExp.$3?RegExp.$3:null;if(doctype.hostLong!=null){doctype.hostLongArray=doctype.hostLong.split(/\s*plus\s*/gi);var i=0;while(i<doctype.hostLongArray.length){doctype.hostLongArray[i].match(regPar2);doctype.host.push(RegExp.$1?RegExp.$1:null);doctype.version.push(RegExp.$3?RegExp.$3:null);if(RegExp.$2){doctype.importance.push(RegExp.$2?RegExp.$2:null);}else{doctype.importance.push(RegExp.$4?RegExp.$4:null);}i++;}}}else{doctype.maker=RegExp.$1?RegExp.$1:null;doctype.host=RegExp.$2?RegExp.$2:null;doctype.version=RegExp.$4?RegExp.$4:null;if(RegExp.$3){doctype.importance=RegExp.$3?RegExp.$3:null;}else{doctype.importance=RegExp.$5?RegExp.$5:null;}doctype.language=RegExp.$6?RegExp.$6:null;return true;}}}else{doctype.maker=false;doctype.host=false;doctype.version=false;doctype.importance=false;doctype.language=false;return false;}})();
////////////////////////////////////////////////////////////////////////////
/** EXTRA **/
function $addEvent(obj,evType,fn,useCapture){if(obj.addEventListener){obj.addEventListener(evType,fn,useCapture);}else if(obj.attachEvent){obj.attachEvent("on"+evType,fn);}};
function $removeEvent(obj,evType,fn,useCapture){if(obj.removeEventListener){obj.removeEventListener(evType,fn,useCapture);}else if(obj.detachEvent){obj.detachEvent("on"+evType,fn);}};
function $getElementsByClassName(obj,tagName,classNames){var arrElements=(tagName=="*"&&obj.all)?obj.all:obj.getElementsByTagName(tagName);var arrReturnElements=new Array();var arrRegExpClassNames=new Array();if(typeof classNames=="object"){for(var i=0;i<classNames.length;i++){arrRegExpClassNames.push(new RegExp("(^|\\s)"+classNames[i].replace(/\-/g, "\\-")+"(\\s|$)"));}}else{arrRegExpClassNames.push(new RegExp("(^|\\s)"+classNames.replace(/\-/g,"\\-")+"(\\s|$)"));}var oElement;var bMatchesAll;for(var j=0;j<arrElements.length;j++){oElement=arrElements[j];bMatchesAll=true;for(var k=0;k<arrRegExpClassNames.length;k++){if(!arrRegExpClassNames[k].test(oElement.className)){bMatchesAll=false;break;}}if(bMatchesAll){arrReturnElements.push(oElement);}}return arrReturnElements;};
function $timeDateWords(t){var shorten=false;var timeDateWord=false;var timeUnits=[{name:'millisecond',pluralName:'milliseconds',min:0,max:1000},{name:'second',pluralName:'secondes',min:1000,max:60*1000},{name:'minute',pluralName:'minutes',min:60*1000,max:60*60*1000},{name:'hour',pluralName:'hours',min:60*60*1000,max:24*60*60*1000},{name:'day',pluralName:'days',min:24*60*60*1000,max:7*24*60*60*1000},{name:'week',pluralName:'weeks',min:7*24*60*60*1000,max:365*24*60*60*1000},{name:'year',pluralName:'years',min:365*24*60*60*1000,max:Infinity}];for(var i=0,timeUnit=null;timeUnit=timeUnits[i];i++){if(t.between(timeUnit.min,timeUnit.max)){var timeVal=Math.floor(t/(timeUnit.min!=0?timeUnit.min:1));timeDateWord=(timeVal!=(1&&shorten)?timeVal+" ":'')+(timeVal!=1?timeUnit.pluralName:timeUnit.name);}}return timeDateWord;};
function validateColorInput(obj,alternativeObj){var namedColors = new Array('AliceBlue','AntiqueWhite','Aqua','Aquamarine','Azure','Beige','Bisque','Black','BlanchedAlmond','Blue','BlueViolet','Brown','BurlyWood','CadetBlue','Chartreuse','Chocolate','Coral','CornflowerBlue','Cornsilk','Crimson','Cyan','DarkBlue','DarkCyan','DarkGoldenRod','DarkGray','DarkGreen','DarkKhaki','DarkMagenta','DarkOliveGreen','Darkorange','DarkOrchid','DarkRed','DarkSalmon','DarkSeaGreen','DarkSlateBlue','DarkSlateGray','DarkTurquoise','DarkViolet','DeepPink','DeepSkyBlue','DimGray','DodgerBlue','Feldspar','FireBrick','FloralWhite','ForestGreen','Fuchsia','Gainsboro','GhostWhite','Gold','GoldenRod','Gray','Grey','Green','GreenYellow','HoneyDew','HotPink','IndianRed','Indigo','Ivory','Khaki','Lavender','LavenderBlush','LawnGreen','LemonChiffon','LightBlue','LightCoral','LightCyan','LightGoldenRodYellow','LightGrey','LightGreen','LightPink','LightSalmon','LightSeaGreen','LightSkyBlue','LightSlateBlue','LightSlateGray','LightSteelBlue','LightYellow','Lime','LimeGreen','Linen','Magenta','Maroon','MediumAquaMarine','MediumBlue','MediumOrchid','MediumPurple','MediumSeaGreen','MediumSlateBlue','MediumSpringGreen','MediumTurquoise','MediumVioletRed','MidnightBlue','MintCream','MistyRose','Moccasin','NavajoWhite','Navy','OldLace','Olive','OliveDrab','Orange','OrangeRed','Orchid','PaleGoldenRod','PaleGreen','PaleTurquoise','PaleVioletRed','PapayaWhip','PeachPuff','Peru','Pink','Plum','PowderBlue','Purple','Red','RosyBrown','RoyalBlue','SaddleBrown','Salmon','SandyBrown','SeaGreen','SeaShell','Sienna','Silver','SkyBlue','SlateBlue','SlateGray','Snow','SpringGreen','SteelBlue','Tan','Teal','Thistle','Tomato','Turquoise','Violet','VioletRed','Wheat','White','WhiteSmoke','Yellow','YellowGreen','ActiveBorder','ActiveCaption','AppWorkspace','Background','ButtonFace','ButtonHighlight','ButtonShadow','ButtonText','CaptionText','GrayText','Highlight','HighlightText','InactiveBorder','InactiveCaption','InactiveCaptionText','InfoBackground','InfoText','Menu','MenuText','Scrollbar','ThreeDDarkShadow','ThreeDFace','ThreeDHighlight','ThreeDLightShadow','ThreeDShadow','Window','WindowFrame','WindowText');var colorField=obj;var validateColorFalse=new Array();var v=0;var spaceRegExp=/\s+/g;var colorRegExp1a=/^#?([a-fA-F0-9]){6,6}\s*$/;var colorRegExp1b=/^#?([a-fA-F0-9]){3,3}\s*$/;var colorRegExp2=/^([a-zA-Z]){1}/;var colorRegExp3=/^#?([a-fA-F0-9]{1})([a-fA-F0-9]{1})([a-fA-F0-9]{1})\s*$/;for(var f=0;f<colorField.length;f++){colorField[f].value=colorField[f].value.replace(spaceRegExp,"");if(colorRegExp1a.test(colorField[f].value)){if(colorField[f].value.indexOf("#",0)){colorField[f].value="#"+colorField[f].value;validateColorFalse[v]=f;v++;}else{colorField[f].value=colorField[f].value;validateColorFalse[v]=f;v++;}}else if(colorRegExp1b.test(colorField[f].value)){colorField[f].value=colorField[f].value.replace(colorRegExp3,"$1$1$2$2$3$3");if(colorField[f].value.indexOf("#",0)){colorField[f].value="#"+colorField[f].value;validateColorFalse[v]=f;v++;}else{colorField[f].value=colorField[f].value;validateColorFalse[v]=f;v++;}}else if(colorRegExp2.test(colorField[f].value)){if(namedColors.searchArray(colorField[f].value)){colorField[f].value=colorField[f].value.charAt(0).toUpperCase()+colorField[f].value.substring(1,colorField[f].value.length).toLowerCase();validateColorFalse[v]=f;v++;}else colorField[f].value=colorField[f].value;}else{colorField[f].value=colorField[f].value;}$sa(colorField[f],"style","background-image:"+$getStyle(colorField[f],"background-image")+";background-repeat:no-repeat;background-position:right;"+"border-color:red;");for(j=0;j<v;j++){$sa(colorField[validateColorFalse[j]],"style","background-image:"+$getStyle(colorField[j],"background-image")+";background-repeat:no-repeat;background-position:right;"+"border-color:green;");}}for(var a=0;a<alternativeObj.length;a++){$sa(alternativeObj[a],"style","background-image:"+$getStyle(alternativeObj[a],"background-image")+";background-repeat:no-repeat;background-position:right;"+"border-color:green;");}if((colorField.length-v)>0){return false;}else return true;}
function $x(xpath,root){var doc=root?root.evaluate?root:root.ownerDocument:document,next;var got=doc.evaluate(xpath,root||doc,null,null,null),result=[];while(next=got.iterateNext())result.push(next);return result;};
function $xs(xpath,root){var doc=root?root.evaluate?root:root.ownerDocument:document,next;return doc.evaluate(xpath,root||doc, null,XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;};
function isTypeOf(obj,constructor){return eval('(typeof('+obj+')=="'+constructor+'");');};
var is={Null:function(a){return a===null;},Undefined:function(a){return a===undefined;},nt:function(a){return(a===null||a===undefined);},Function:function(a){return(typeof(a)==='function')?a.constructor.toString().match(/Function/)!==null:false;},String:function(a){return(typeof(a)==='string')?true:(typeof(a)==='object')?a.constructor.toString().match(/string/i)!==null:false;},Array:function(a){return(typeof(a)==='object')?a.constructor.toString().match(/array/i)!==null||a.length!==undefined:false;},Boolean:function(a){return(typeof(a)==='boolean')?true:(typeof(a)==='object')?a.constructor.toString().match(/boolean/i)!==null:false;},Date:function(a){return(typeof(a)==='date')?true:(typeof(a)==='object')?a.constructor.toString().match(/date/i)!==null:false;},HTML:function(a){return(typeof(a)==='object')?a.constructor.toString().match(/html/i)!==null:false;},Number:function(a){return(typeof(a)==='number')?true:(typeof(a)==='object')?a.constructor.toString().match(/Number/)!==null:false;},Object:function(a){return(typeof(a)==='object')?a.constructor.toString().match(/object/i)!==null:false;},RegExp:function(a){return(typeof(a)==='function')?a.constructor.toString().match(/regexp/i)!==null:false;}};var type={of:function(obj){for(var i in is){if(is[i](obj)){return i.toLowerCase();}}}};
////////////////////////////////////////////////////////////////////////////
// alert msg; [type: 'n'=normal / 'g'=US_log / 'c'=console] [methode: '1'=debug / '2'=info / '3'=warn / '4'=error] (use '' for empty)(on console-debug and -info no contacttext is shown)  || $alert('c',2,'test01','testtxt');
function $alert(type,methode,error,msg){contactTxt="\nContact. : Please contact the owner/scripter about this problem.";if(typeof(console)!="undefined"&&type!='g'&&type!='n'){var consoleErrorTxt="Error Nr : "+error+" (console)\n"+"Message  : "+msg+contactTxt;var consoleInfoTxt="Error Nr : "+error+" (console)\n"+"Message  : "+msg;if(methode==1)console.debug(consoleInfoTxt);else if(methode==2)console.info(consoleInfoTxt);else if(methode==3)console.warn(consoleErrorTxt);else if(methode==4)console.error(consoleErrorTxt);else console.warn(consoleErrorTxt);}if(typeof(US_log)!="undefined"&&type!='c'&&type!='n'){US_log("Error Nr. : "+error+" (US_log)\n"+"Message : "+msg+contactTxt);}if(type!='c'&&type!='g')alert("Error Nr. : "+error+" (normal)\n"+"Message : "+msg+contactTxt);};
// Array support for the push method in IE 5
if(typeof Array.prototype.push!="function"){Array.prototype.push=ArrayPush;function ArrayPush(value){this[this.length]=value;}}
////////////////////////////////////////////////////////////////////////////

// Converts string input to a camel cased string
// e.g.:	"border-bottom-style".toCamelCase(); // returns "borderBottomStyle";
String.prototype.toCamelCase = function(){
	return this.toString().replace(/([A-Z]+)/g,function(m,l){
		return l.substr(0,1).toUpperCase() + l.toLowerCase().substr(1,l.length);
	}).replace(/[\-_\s](.)/g,function(m,l){
		return l.toUpperCase();
	});
};

//// Converts first letter to capital;
//// e.g.:	"hello".firstLetterCapital(); // returns "Hello";
String.prototype.firstLetterCapital = function(){
	return this.toString().substr(0,1).toUpperCase() + this.toString().toLowerCase().substr(1,this.toString().length);
};


// e.g.:	alert("Jonas\n".repeat(5));
String.prototype.repeat = function(l){
	return new Array(l+1).join(this);
};


function isUrl(argvalue) {

  if (argvalue.indexOf(" ") != -1)
    return false;
  else if (argvalue.indexOf("http://") == -1)
    return false;
  else if (argvalue == "http://")
    return false;
  else if (argvalue.indexOf("http://") > 0)
    return false;

  argvalue = argvalue.substring(7, argvalue.length);
  if (argvalue.indexOf(".") == -1)
    return false;
  else if (argvalue.indexOf(".") == 0)
    return false;
  else if (argvalue.charAt(argvalue.length - 1) == ".")
    return false;

  if (argvalue.indexOf("/") != -1) {
    argvalue = argvalue.substring(0, argvalue.indexOf("/"));
    if (argvalue.charAt(argvalue.length - 1) == ".")
      return false;
  }

  if (argvalue.indexOf(":") != -1) {
    if (argvalue.indexOf(":") == (argvalue.length - 1))
      return false;
    else if (argvalue.charAt(argvalue.indexOf(":") + 1) == ".")
      return false;
    argvalue = argvalue.substring(0, argvalue.indexOf(":"));
    if (argvalue.charAt(argvalue.length - 1) == ".")
      return false;
  }
  return true;
}
function isInt(n,way){
	if(way==true){var reg=/^[0-9]+$/;}  // positive
	else if(way==false){var reg=/^-[0-9]+$/;}  // negative
	else{var reg=/^-?[0-9]+$/;}  // both
	return reg.test(n.toString());
}



/** BEFORELOAD **/
function initDrawClock(){
	drawClock(
		'#0000ff',	//colour of hour hand
		'#009900',	//colour of minute hand
		'#ff0000',	//colour of second hand
		'#D2D2D2',	//colour of numbers
		25,			//size of clock - best around 50
		1,			//position of clock: 1 = top-left, 2 = top-right, 3 = bottom-left, 4 = bottom-right
		80,			//horizontal offset from normal position in corner (normally 0)
		6,			//vertical offset from normal position in corner (normally 0)
		false		//scroll with screen
	);
}
/** AFTERLOAD **/
function initSetBanner(bannerSet){
/* 		var bannerSetName = new Banner('bannerSetName');
		initSetBanner([[bannerSetName,'bannerSetId'],[...,...],...]);
		e.g:	var bannerSet1 = new Banner('bannerSet1');
				var bannerSet2 = new Banner('bannerSet2');
				initSetBanner([[bannerSet1,'bannerSet1Div'],[bannerSet2,'bannerSet2Div']]);	

		bannerSetName [VARIABLE]
		The name for the set off banners.
		e.g: bannerSet1
		
		bannerSetId [STRING]
		The id where the banner must be placed.
*///	e.g: bannerSet1Div
	if(bannerSet){
		for(x1=0; x1<bannerSet.length;x1++){  // for(var x1 in bannerSet){
			bannerSetName = bannerSet[x1][0];
			bannerSetId = bannerSet[x1][1];
			if($gi(bannerSetId)){
				switch(x1){
					default:
					case 0:
						// bannerName.add('[image,iframe,flash]','src',duration,height,width,'link');
		  /* cenio */	bannerSetName.add("image", "http://b.ds1.nl/558/33528?wi=55972&ws=AD004", 5,100, 120,"http://ds1.nl/c/?wi=55972&ws=AD004&si=558&li=33528");
/* traffic control */	bannerSetName.add("image", "http://b.ds1.nl/368/23034?wi=55972&ws=AD005", 5, 90, 120,"http://ds1.nl/c/?wi=55972&ws=AD005&si=368&li=23034");
			/* tnt */	bannerSetName.add("image", "http://b.ds1.nl/667/40863?wi=55972&ws=AD006", 5, 90, 120,"http://ds1.nl/c/?wi=55972&ws=AD006&si=667&li=40863");
	/* Gadgethouse */	bannerSetName.add("image", "http://b.ds1.nl/664/43134?wi=55972&ws=AD007", 5, 90, 120,"http://ds1.nl/c/?wi=55972&ws=AD007&si=664&li=43134");
					break;
				}
				$gi(bannerSetId).innerHTML = bannerSetName;
				bannerSetName.addTime();
				bannerSetName.start();
}	}	}	};
function setFavicon(root_extra){
	favicon.animate([root_extra+"favicon.ico", root_extra+"favicon_02.ico", root_extra+"favicon_03.ico", root_extra+"favicon_04.ico"], {delay:1000})
	window.onblur=function(){favicon.unanimate()};
	window.onfocus=function(){favicon.animate([root_extra+"favicon.ico", root_extra+"favicon_02.ico", root_extra+"favicon_03.ico", root_extra+"favicon_04.ico"], {delay:1000})};
}



/*function loadingBox(){
	console.log('test0');
	console.log('test1');
	loadingBoxX = $ce("div");
	$sa(loadingBoxX,"id","loadingBoxX");
	$ih(loadingBoxX,"Loading...");
}
function loadingBox2(){
	console.log('test2');
}*/



//** COPYRIGHT YEAR **//
function copyRYear(){
	if($gi('footer_left')){
		thisYear = $2D.getFullYear()
		if (thisYear != 2007 || thisYear != "2007"){
			$ih($gi('footer_left'),"Copyright &copy; 2007 - " + thisYear + " || Jerone WP Productions. All rights reserved.");
		}
	}
}


//*** NO ICONS ***//
function hideIcons(){
	ii = $getElementsByClassName(document,"IMG","icon");
	for(var i=0; i < ii.length; i++) {
		if($hs(ii[i],2,true)){
			$hs(ii[i],1);
			ii[i].style.display = '';  // 'block' displays wrong.
			$gi('noIconsX').src = "images/picture_delete.png";
			$gi('noIconsX').name = "Hide Icons";
			$gi('noIconsX').alt = "Hide Icons";
			$gi('noIconsX').title = "Hide Icons";
			$gi('noIconsX').parentNode.parentNode.parentNode.parentNode.title = "Hide Icons";
		}
		else{
			$hs(ii[i],2);
			$gi('noIconsX').src = "images/picture_add.png";
			$gi('noIconsX').name = "Show Icons";
			$gi('noIconsX').alt = "Show Icons";
			$gi('noIconsX').title = "Show Icons";
			$gi('noIconsX').parentNode.parentNode.parentNode.parentNode.title = "Show Icons";
		}
	}
}






/*
function $setOpacity2(obj,n) {
//	if(n==5){alert(n+obj);}
console.log(this);
obj.src ="";
//	console.log(obj.length);
//		$gi("testImg").style.border = "1px solid red";
		obj.style.border = "1px solid red";
//		obj.filters.alpha.opacity=70;
//	for(var h=0; h < obj.length; h++) {
//		obj[h].filters.alpha.opacity=70;
//		obj[h].style.border = "1px solid red";
//		$gi("testImg").filters.alpha.opacity=70;
//		console.log('hoignagng');
//	}
//	var obj = obj.style;
//	obj.style.opacity = "0.5"; //**CSS3**
//	obj.MozOpacity = (n/100); //**Mozilla**
//	obj.KhtmlOpacity = (n/100); //**KHTML**
//	obj.filter = "alpha(opacity=" + n + ")"; //**IE**
//	obj.filters.alpha.opacity=40; //**IE**
//	obj.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + n + ")"; //**IE old**
};
function $opacityFadeIn2(obj,opacStart,opacEnd,opacTime,opacSteps,functBusy,functFinish){
	if (opacStart < opacEnd) {
		$setOpacity2(obj,opacStart);
		alert(obj);
		t = setTimeout(function(){opacStart+=(opacSteps); $opacityFadeIn2(obj,opacStart,opacEnd,opacTime,opacSteps,functBusy,functFinish)},opacTime);
	}
	else if (opacStart >= opacEnd) {
		clearTimeout(t);
//		alert('jopi');
	}	
	else{
		clearTimeout(t);
	}
};

Function.prototype.toEvent = Function.prototype.bindAsEventListener= function(){
  var _method= this, r=[], len=arguments.length, i=0;//alert(len)
  for (i;i<len;i++){ r[i+1]=arguments[i] }
  return function( ev ){  r[0]= ev= ev || event; 
    var db=document.body, dd=document.documentElement;
    r[r.length++]=(ev.pageX)? [ev.pageX, ev.pageY] : 
      [ev.clientX + db.scrollLeft+ dd.scrollLeft, 
       ev.clientY + db.scrollTop + dd.scrollTop];
    return _method.apply(ev.target|| ev.srcElement, r);
  };
};

function opacHover(){
//	$addEvent($gi("testImg"),"mouseover",function(){$gi("testImg").filters.alpha.opacity=100});
//	$addEvent($gi("testImg"),"mouseout",function(){$gi("testImg").filters.alpha.opacity=40});
	
//	$addCSS(".opacHover{" + $setReturnOpacity(50) +  "} .opacHover:hover{" + $setReturnOpacity(100) + "}");
	ii = $getElementsByClassName(document,"*","opacHover");
	for(var i=0; i < ii.length; i++) {
		var jbo = ii[i];
//		$addEvent(ii[i],"mouseout",function(){alert(this);});
		$addEvent(ii[i],"mouseover",function(e){
			var node = (e) ? e.target : window.event.srcElement; 
			node.style.border="1px solid red";
		});
//		$addEvent(ii[i],"mouseover",function(){$opacityFadeIn2(this,0,101,100,5)},false);
	}
}
*/
function opacHover(){};