if(!Array.indexOf){
	Array.prototype.indexOf = function(obj){
		for(var i=0; i<this.length; i++){
			if(this[i]==obj){
				return i;
			}
		}
		return -1;
	}
}
// resizing

var resizingObjects=new Array();
var resizingTimer=null;
function resizeObject(obj,stretchX,stretchY,fromX,fromY,toX,toY,centeredObj,maxStep,division,ifnone,handler) {
	index=resizeObjIndex(obj);
	ok=(index<0);
	if (ifnone) ok=(obj.style.display=="none");
	if (ok) {
		if (toX===null && toY===null) {
			dims=objFreeSize(obj,stretchX,stretchY);
			if (stretchX) toX=dims[0];
			if (stretchY) toY=dims[1];
			
		}
		if (fromX===null && fromY===null) {
			if (obj.style.display=="none") {
				dims=[0,0];
			}else{
				dims=objFreeSize(obj,stretchX,stretchY);
			}
			if (stretchX) fromX=dims[0];
			if (stretchY) fromY=dims[1];
		}
		if (index>=0) {
			if (resizingObjects[index]["toX"]!=toX && resizingObjects[index]["toY"]!=toY) {
				resizingObjects[index]["toX"]=toX;
				resizingObjects[index]["toY"]=toY;
				resizingObjects[index]["elasticX"]=stretchX;
				resizingObjects[index]["elasticY"]=stretchY;
			}else{
				index=-1;
			}
		}
		if (index<0) {
			if (toY!=fromY || toX!=fromX) {
				resizingObjects.push({"sizeObj":obj,"elasticX":stretchX,"elasticY":stretchY,"toX":toX,"toY":toY,"currentX":fromX,"currentY":fromY,"maxStep":maxStep,"division":division,"centeredContainer":centeredObj,"handler":handler});
				os=obj.style;
				if (stretchX) os.width=fromX+"px";
				if (stretchY) os.height=fromY+"px";
				os.overflow="hidden";
				os.display="block";
			}
		}
		if (resizingTimer===null) resizingTimer=setTimeout("resizeProcess()",2);
	}
}
function resizeObjIndex(obj) {
	index=-1;
	for(i=0;i<resizingObjects.length;i++) {
		if (resizingObjects[i]["sizeObj"]==obj) index=i;
	}
	return index;
}
function resizeProcess() {
	if (resizingObjects.length>0) {
		for(i=resizingObjects.length-1;i>=0;i--) {
			o=resizingObjects[i];
			fin=true;
			if (o["elasticX"]) {
				cx=(o["toX"]-o["currentX"])/o["division"];
				if (cx<-o["maxStep"]) cx=-o["maxStep"];
				if (cx>o["maxStep"]) cx=o["maxStep"];
				if (cx>=-1 && cx<=1) {
					cx=o["toX"];
				}else{
					fin=false;
					cx+=o["currentX"];
				}
				resizingObjects[i]["currentX"]=cx;
				o["sizeObj"].style.width=cx+"px";
			}
			if (o["elasticY"]) {
				cy=(o["toY"]-o["currentY"])/o["division"];
				if (cy<-o["maxStep"]) cy=-o["maxStep"];
				if (cy>o["maxStep"]) cy=o["maxStep"];
				if (cy>=-1 && cy<=1) {
					cy=o["toY"];
				}else{
					fin=false;
					cy+=o["currentY"];
				}
				resizingObjects[i]["currentY"]=cy;
				o["sizeObj"].style.height=cy+"px";
			}
			if (o["centeredContainer"]) centerObject(o["centeredContainer"]);
			if (fin) {
				o["sizeObj"].style.overflow="";
				if (o["toX"]==0 || o["toY"]==0) o["sizeObj"].style.display="none";
				if (o["handler"]) o["handler"]();
				resizingObjects.splice(i,1);
			}
		}
		if (resizingObjects.length>0) {
			resizingTimer=setTimeout("resizeProcess()",2);
		}else{
			resizingTimer=null;
		}
	}else{
		resizingTimer=null;
	}
}
function objFreeSize(obj,stretchX,stretchY) {
	if (obj.style.display=="none") {
		if (stretchY) fh=obj.style.height;
		if (stretchX) fw=obj.style.width;
		obj.style.visibility="hidden";
		obj.style.display="block";
		if (stretchY) obj.style.height="";
		if (stretchX) obj.style.width="";
		w=obj.clientWidth;
		h=obj.clientHeight;
		if (stretchY) obj.style.height=fh;
		if (stretchX) obj.style.width=fw;
		obj.style.display="none";
		obj.style.visibility="visible";
	}else{
		w=obj.clientWidth;
		h=obj.clientHeight;
	}
	return [w,h];
}
function objid(id) {
	return document.getElementById(id);
}
function drawBlack()
{
    pasteRawHTML("<div id=\"blackBox\" style=\"visibility:hidden;position:fixed;z-index:3;padding:0px;margin:0px;top:0px;left:0px;width:100%;height:100%\" >&nbsp;</div>",document.body);
    sizeFader();
}
function sizeFader() {
    if (objid("blackBox")!=null)     {
        var docHeight=(typeof document.height != 'undefined')?document.height:(document.compatMode && document.compatMode != 'BackCompat')?document.documentElement.scrollHeight:document.body.scrollHeight;
        var wh=getWindowHeight();
        if (docHeight<wh) docHeight=wh;
        obj=objid("blackBox");
        obj.style.height=docHeight+"px";
    }
    if (objid("dialogBox")!=null) centerObject(objid("dialogBox"));
}
function fader(obj,o) {if (obj.style) {if (o==100) {if (obj.style.MozOpacity!=null){obj.style.MozOpacity = "";}else if (obj.style.opacity!=null){obj.style.opacity = "";}else if (obj.style.filter!=null){obj.style.filter = "";}}else{if (obj.style.MozOpacity!=null){obj.style.MozOpacity = (o/100) - .001;}else if (obj.style.opacity!=null){obj.style.opacity = (o/100) - .001;}else if (obj.style.filter!=null){obj.style.filter = "alpha(opacity="+o+")";}}}}

function startFadeUp() {
    window.onresize=sizeFader;
    window.onscroll=sizeFader;
    if (objid("blackBox")==null) drawBlack();
    obj=objid("blackBox");
	fadeObject(obj,0,desiredDarkness,faderSteps,null);
}
function backgroundGone() {
	removeTheNode("blackBox");
	window.onresize=null;
	window.onscroll=null;
}
function startFadeDown() {
    if (objid("blackBox")!=null) fadeObject(objid("blackBox"),desiredDarkness,0,faderSteps,backgroundGone);
}
function getWindowHeight() {
    var myHeight = ( typeof( window.innerWidth ) == 'number' )?window.innerHeight:( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )?document.documentElement.clientHeight:document.body.clientHeight;
    return myHeight;
}
function getScrollXY()
{
    var scrOfX = 0, scrOfY = 0;
    if( typeof( window.pageYOffset ) == 'number' )
    {
        //Netscape compliant
        scrOfY = window.pageYOffset;
        scrOfX = window.pageXOffset;
    }
    else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) )
    {
        //DOM compliant
        scrOfY = document.body.scrollTop;
        scrOfX = document.body.scrollLeft;
    }
    else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) )
    {
        //IE6 standards compliant mode
        scrOfY = document.documentElement.scrollTop;
        scrOfX = document.documentElement.scrollLeft;
    }
    //pasteRawHTML(scrOfY+"<br />",document.body);
    return [ scrOfX, scrOfY ];
}
function getWindowWidth() {
    var myWidth = 0, myHeight = 0;
    if( typeof( window.innerWidth ) == 'number' )
    {
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    }
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
    {
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    }
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
    {
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    return myWidth;
} 
function startFadeIn(srcObj)
{
    fadeInOutObj=srcObj;
    fadeInOutOpacity=0;
    fader(fadeInOutObj,fadeInOutOpacity);
    fadeInOutObj.style.visibility="visible";
    if (typeof timer != 'undefined') clearTimeout(timer);
    timer = setTimeout("fadeInTimer()",2);
}

function startFadeOut(srcObj)
{
    if (fadeInOutObj!==srcObj) {
        fadeInOutObj=srcObj;
        fadeInOutOpacity=100;
    }
    fader(fadeInOutObj,fadeInOutOpacity);
    if (typeof timer != 'undefined') clearTimeout(timer);
    timer = setTimeout("fadeOutTimer()",2);
}

function removeTheNode(idname) {
	if (typeof(idname)=="string") {
		if (o=objid(idname)) {
			if (index=resizeObjIndex(o)) resizingObjects.splice(index,1);
			o.parentNode.removeChild(o);
		}
	}else{
		idname.parentNode.removeChild(idname);
	}
    sizeFader();
}
function returnRoundedBox(id,title,content,centerText,zindex,width,removeWhichArray,withClose,withoutFadeDown) {
	op="<table id='"+id+"' cellpadding=0 cellspacing=0 style='position:fixed;z-index:"+zindex+";"+((width!=null)?"width:"+width+"px":"")+"'><tr><td class='tl'></td><td class='t'></td><td class='tr'></td></tr>";
	op+="<tr><td class='l'></td><td class='c' style='text-align:"+(centerText?"center":"left")+"'>";
	op+="<div style='height:30px;text-align:left'>";
	if (title!="") {
		removeThese="";
		if (removeWhichArray!=null) {
			rems=removeWhichArray.split(",");
			if (removeWhichArray!=null) for(i=0;i<rems.length;i++) removeThese+=";removeTheNode('"+rems[i]+"')";
		}
		if (withClose) {
			op+="<img src=\"/skin/close.png\" onmouseout=\"this.src='/skin/close.png'\" onmouseover=\"this.src='/skin/closeover.png'\" style=\"float:right;cursor:pointer;right:7px;top:7px;\" alt=\"Close\" onclick=\"";
			if (withoutFadeDown) op+="startFadeDown();";
			op+="removeTheNode('"+id+"');"+removeThese+"\" />";
		}
	}
	op+=title+"</div>";
	op+=content+"</td><td class='r'></td></tr>";
	
	op+="<tr><td class='bl'></td><td class='b'></td><td class='br'></td></tr></table>";
	//output+="<tr><td class=\"bl\">&nbsp;</td><rd class=\"b\">&nbsp;</td><td class=\"br\">&nbsp;</td></tr>";
	//output+="</table>";
	return op;
}
function pasteRawHTML(theHTML,destinationObj)
{
    var hiddenArea=null;
    if (objid("ParseArea")==null)
    {
        hiddenArea=document.createElement("div");
        hiddenArea.style.display="none";
        hiddenArea.id="ParseArea";
    }
    else
    {
        hiddenArea = objid("ParseArea");
    }
    hiddenArea.innerHTML=theHTML;
	while(hiddenArea.childNodes.length>0) destinationObj.appendChild(hiddenArea.childNodes[0]);
    hiddenArea.innerHTML="";
}
function centerObject(obj)
{
    var st = (window.pageYOffset)?(window.pageYOffset):(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop;
    var scrolls=getScrollXY();
    st=scrolls[1];
	if (obj.style.position=="fixed") st=0;
    var wh = getWindowHeight();
    var t=(obj.clientHeight>wh)?st:((wh-obj.clientHeight)/2)+st;
    if (t<10) t=10;
    l=((document.body.offsetWidth-obj.clientWidth)/2);
    if (l<0) l=0;
    obj.style.left=l+"px";
    obj.style.top=t+"px";
}

var fadingObjects=new Array();
var fadeobjectinterval=2;
//{object;from;to;steps;completehandler}
var faderTimer=null;
function fadeObject(obj,from,to,steps,handler) {
	fadingObjects.push({'object':obj,'from':from,'to':to,'steps':steps,'handler':handler,'alpha':from});
	if (fadingObjects.length>0 && faderTimer==null) faderTimer=setTimeout("fadeObjects()",fadeobjectinterval);
}
function fadeObjects() {
	toremove=new Array();
	for(o=0;o<fadingObjects.length;o++) {
		obj=fadingObjects[o];
		step=obj["steps"];
		if (obj["from"]>obj["to"]) step=-step;
		obj['alpha']+=step;
		if (obj["alpha"]>=obj["to"] && step>0) {
			obj['alpha']=obj['to'];
			toremove.push(o);
		}else if(obj["alpha"]<=obj["to"] && step<0) {
			obj['alpha']=obj['to'];
			toremove.push(o);
		}
		fader(obj["object"],obj["alpha"]);
		if (obj['object'].style.visibility=='hidden') obj['object'].style.visibility="visible";
		//pasteRawHTML("<div>"+obj['object'].id+":"+obj['alpha']+"</div>",document.body);
	}
	toremove.reverse();
	for(r=0;r<toremove.length;r++) {
		if (fadingObjects[toremove[r]]['handler']!=null) fadingObjects[toremove[r]]['handler']();
		fadingObjects.splice(toremove[r],1);
	}
	if (fadingObjects.length>0) {
		faderTimer=setTimeout("fadeObjects()",fadeobjectinterval);
	}else{
		clearTimeout(faderTimer);
		faderTimer=null;
	}
}
function eventLocation(e,incScroll) {
	if (window.event) {
		x = window.event.clientX + (incScroll?document.documentElement.scrollLeft + document.body.scrollLeft:0);
		y = window.event.clientY + (incScroll?document.documentElement.scrollTop + document.body.scrollTop:0);
	}else{
		x = e.clientX + (incScroll?window.scrollX:0);
		y = e.clientY + (incScroll?window.scrollY:0);
	}
	return [x,y];
}
function toggleExpansion(srcObj, expandTheWidth, expandTheHeight, collapseOthers) {
	if (typeof(srcObj)=="string") srcObj=objid(srcObj);
	if (srcObj.style.display=="none") {
		resizeObject(srcObj,expandTheWidth,expandTheHeight,null,null,null,null,null,20,2,true,null);
		o=collapseOthers.split(":");
		for(i=0;i<o.length;i++) {
			ot=objid(o[i]);
			if (ot.style.display=="block") resizeObject(ot,expandTheWidth,expandTheHeight,ot.clientWidth,ot.clientHeight,0,0,null,20,2,false,null);
		}
	}
}

var scrolling=null;
function scrollToElement(id) {
	var scrollloc=getTop(document.getElementById(id));
    if (scrolling==null) scrolling=new Array(scrollloc,setTimeout("smoothScroll()",2));
}
function smoothScroll() {
	maxScroll=20;
	if (scrolling!=null) {
		scrolls=getScrollXY();
		ds=(scrolling[0]-scrolls[1])/3;
		if (ds<-maxScroll) ds=-maxScroll;
		if (ds>maxScroll) ds=maxScroll;
		window.scrollTo(scrolls[0],scrolls[1]+ds);
		if (getScrollXY()[1]==scrolls[1]) ds=0;
		if (ds<-1 || ds>1) {
			scrolling[1]=setTimeout("smoothScroll()",2);
		}else{
			scrolling=null;
		}
	}
}
currentRequests=new Array();
currentHandlers=new Array();
function sendPostRequest(docUrl,parameters,returnHandler) {
    now=new Date();
    docUrl+="?rand="+now.valueOf();
    if (window.XMLHttpRequest){
        thisRequest=new XMLHttpRequest();
        currentHandlers.push(returnHandler);
        thisRequest.onreadystatechange=requestReceived;
        thisRequest.open("POST",docUrl,true);
		thisRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
        currentRequests.push(thisRequest);
        thisRequest.send(parameters);
    }else if (window.ActiveXObject){
        thisRequest=new ActiveXObject("Microsoft.XMLHTTP");
        currentRequests.push(thisRequest);
        currentHandlers.push(returnHandler);
        if (thisRequest){
            thisRequest.onreadystatechange=requestReceived;
            thisRequest.open("POST",docUrl,true);
			thisRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
            thisRequest.send(parameters);
        }
    }
}
function requestReceived() {
    reply="";
    for (requestIndex=currentRequests.length-1;requestIndex>=0;requestIndex--) {
        if (currentRequests[requestIndex].readyState==4) {
            reply=currentRequests[requestIndex].responseText;
			currentRequests[requestIndex].getAllResponseHeaders()
            if (currentRequests[requestIndex].status==200) {
                reply=currentRequests[requestIndex].responseText;
            }
            currentRequests[requestIndex]=null;
            currentRequests.splice(requestIndex,1);
            thisHandler=currentHandlers[requestIndex];
            currentHandlers.splice(requestIndex,1);
            thisHandler(reply);
        }
    }
}

var timer=null;
var currentOpacity=0;
var selectedObj=null;
var cycled=0;
var maxCycle=0;
var currentInterval=0;
var faderSteps=5;
var desiredDarkness=60;
var fadeInOutObj=null;
var fadeInOutOpacity=0;
function drawBlack()
{
    pasteRawHTML("<div id=\"blackBox\" style=\"visibility:visible;position:fixed;z-index:3;padding:0px;margin:0px;top:0px;left:0px;width:100%;height:100%\" >&nbsp;</div>",document.body);
    sizeFader();
}
function sizeFader()
{
    if (document.getElementById("blackBox")!=null)
    {
        var docHeight=(typeof document.height != 'undefined')?document.height:(document.compatMode && document.compatMode != 'BackCompat')?document.documentElement.scrollHeight:document.body.scrollHeight;
        var wh=getWindowHeight();
        if (docHeight<wh) docHeight=wh;
        obj=document.getElementById("blackBox");
        obj.style.height=docHeight+"px";
    }
    if (document.getElementById("dialogBox")!=null) centerObject(document.getElementById("dialogBox"));
}
function fader(obj,o) {if (obj.style) {if (o==100) {if (obj.style.MozOpacity!=null){obj.style.MozOpacity = "";}else if (obj.style.opacity!=null){obj.style.opacity = "";}else if (obj.style.filter!=null){obj.style.filter = "";}}else{if (obj.style.MozOpacity!=null){obj.style.MozOpacity = (o/100) - .001;}else if (obj.style.opacity!=null){obj.style.opacity = (o/100) - .001;}else if (obj.style.filter!=null){obj.style.filter = "alpha(opacity="+o+")";}}}}
function fadeUpTimer()
{
    obj=document.getElementById("blackBox");
    currentOpacity+=faderSteps;
    if (currentOpacity>desiredDarkness)
    {
        currentOpacity=desiredDarkness;
    }
    fader(obj,currentOpacity);
    if (currentOpacity==desiredDarkness)
    {
        clearTimeout(timer);
    }
    else
    {
        timer = setTimeout("fadeUpTimer()",2);
    }
}
function fadeDownTimer()
{
    obj=document.getElementById("blackBox");
    currentOpacity-=faderSteps;
    if (currentOpacity<0)
    {
        currentOpacity=0;
    }
    fader(obj,currentOpacity);
    if (currentOpacity==0)
    {
        clearTimeout(timer);
        removeTheNode("blackBox");
        removeTheNode("dialogBox");
        window.onresize=null;
        window.onscroll=null;
    }
    else
    {
        timer = setTimeout("fadeDownTimer()",2);
    }
}
function startFadeUp()
{
    window.onresize=sizeFader;
    window.onscroll=sizeFader;
    currentOpacity=0;
    if (document.getElementById("blackBox")==null)
    {
        drawBlack();
    }
    //sizeFader();
    obj=document.getElementById("blackBox");
    fader(obj,0);
    //obj.style.height=document.body.clientHeight+"px";
    obj.style.visibility="visible";
    if (typeof timer != 'undefined') clearTimeout(timer);
    timer = setTimeout("fadeUpTimer()",2);
}
function startFadeDown()
{
    if (document.getElementById("blackBox")!=null)
    {
        obj=document.getElementById("blackBox");
        if (typeof timer != 'undefined') clearTimeout(timer);
        timer = setTimeout("fadeDownTimer()",2);
    }
}
function flashThisObject(obj,repeats,interval)
{
    selectedObj=obj;
    currentInterval=interval;
    maxCycle=repeats;
    cycled=0;
    selectedObj.style.visibility="hidden";
    if (typeof timer != 'undefined') clearTimeout(timer);
    timer = setTimeout("flashUpObject()",interval);
}
function flashUpObject()
{
    selectedObj.style.visibility="visible";
    cycled++;
    if (cycled<maxCycle)
    {
        timer = setTimeout("flashDownObject()",currentInterval);
    }
}
function flashDownObject()
{
    selectedObj.style.visibility="hidden";
    timer = setTimeout("flashUpObject()",currentInterval);
}
function getWindowHeight()
{
    var myHeight = ( typeof( window.innerWidth ) == 'number' )?window.innerHeight:( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )?document.documentElement.clientHeight:document.body.clientHeight;
    return myHeight;
}
function startFadeIn(srcObj)
{
    fadeInOutObj=srcObj;
    fadeInOutOpacity=0;
    fader(fadeInOutObj,fadeInOutOpacity);
    fadeInOutObj.style.visibility="visible";
    if (typeof timer != 'undefined') clearTimeout(timer);
    timer = setTimeout("fadeInTimer()",2);
}
function fadeInTimer()
{
    fadeInOutOpacity+=10;
    fader(fadeInOutObj,fadeInOutOpacity);
    if (fadeInOutOpacity==100)
    {
        clearTimeout(timer);
    }
    else
    {
        timer = setTimeout("fadeInTimer()",2);
    }
}
function startFadeOut(srcObj)
{
    if (fadeInOutObj!==srcObj) {
        fadeInOutObj=srcObj;
        fadeInOutOpacity=100;
    }
    fader(fadeInOutObj,fadeInOutOpacity);
    if (typeof timer != 'undefined') clearTimeout(timer);
    timer = setTimeout("fadeOutTimer()",2);
}
function fadeOutTimer()
{
    fadeInOutOpacity-=10;
    fader(fadeInOutObj,fadeInOutOpacity);
    if (fadeInOutOpacity<10)
    {
        clearTimeout(timer);
        removeTheNode(fadeInOutObj.id);
        fadeInOutObj=null;
        fadeInOutOpacity=0;
    }
    else
    {
        timer = setTimeout("fadeOutTimer()",2);
    }
}
var fadein={'obj':null,'min':0,'max':100,'handler':null,'steps':10,'alpha':0,'timer':null};
var fadeobjectinterval=2;
function fadeinobject(obj,minalpha,maxalpha,handler,steps) {
	fadein={'obj':obj,'min':minalpha,'max':maxalpha,'handler':handler,'steps':steps,'alpha':minalpha,'timer':null}
	fader(fadein["obj"],fadein["alpha"]);
    fadein["timer"] = setTimeout("fadeinobjectstep()",fadeobjectinterval);
}
function fadeinobjectstep() {
	if (fadein["obj"]) {
		fadein["alpha"]+=fadein["steps"];
		if (fadein["alpha"]>=fadein["max"]) {
			fadein["alpha"]=fadein["max"];
			clearTimeout(fadein["timer"]);
			fader(fadein["obj"],fadein["alpha"]);
			if (fadein["handler"]!=null) fadein["handler"]();
			fadein["obj"]=null;
			fadein["handler"]=null;
			fadein["timer"]=null;
		}else{
   			fadein["timer"] = setTimeout("fadeinobjectstep()",fadeobjectinterval);
			fader(fadein["obj"],fadein["alpha"]);
		}
	}
}
var fadeout={'obj':null,'min':0,'max':100,'handler':null,'steps':10,'alpha':0,'timer':null};
function fadeoutobject(obj,minalpha,maxalpha,handler,steps) {
	fadeout={'obj':obj,'min':minalpha,'max':maxalpha,'handler':handler,'steps':steps,'alpha':maxalpha,'timer':null}
	fader(fadeout["obj"],fadeout["alpha"]);
    fadeout["timer"] = setTimeout("fadeoutobjectstep()",fadeobjectinterval);
}
function fadeoutobjectstep() {
	if (fadeout["obj"]) {
		fadeout["alpha"]-=fadeout["steps"];
		if (fadeout["alpha"]<=fadeout["min"]) {
			fadeout["alpha"]=fadeout["min"];
			clearTimeout(fadeout["timer"]);
			fader(fadeout["obj"],fadeout["alpha"]);
			if (fadeout["handler"]!=null) fadeout["handler"]();
			fadeout["obj"]=null;
			fadeout["handler"]=null;
			fadeout["timer"]=null;
		}else{
   			fadeout["timer"] = setTimeout("fadeoutobjectstep()",fadeobjectinterval);
			fader(fadeout["obj"],fadeout["alpha"]);
		}
	}
}
function JSONscriptRequest(fullUrl) {
    this.fullUrl = fullUrl; 
    this.noCacheIE = '&noCacheIE=' + (new Date()).getTime();
    this.headLoc = document.getElementsByTagName("head").item(0);
    this.scriptId = 'JscriptId' + JSONscriptRequest.scriptCounter++;
}
JSONscriptRequest.scriptCounter = 1;
JSONscriptRequest.prototype.buildScriptTag = function () {
    this.scriptObj = document.createElement("script");
    this.scriptObj.setAttribute("type", "text/javascript");
    this.scriptObj.setAttribute("charset", "utf-8");
    this.scriptObj.setAttribute("src", this.fullUrl + this.noCacheIE);
    this.scriptObj.setAttribute("id", this.scriptId);
}
JSONscriptRequest.prototype.removeScriptTag = function () {
    this.headLoc.removeChild(this.scriptObj);  
}
JSONscriptRequest.prototype.addScriptTag = function () {
    this.headLoc.appendChild(this.scriptObj);
}