function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
	if (selObj.options[selObj.selectedIndex].value != "nojump") {
		if (targ != "blank" && targ != "_blank")
			eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		else
			window.open(selObj.options[selObj.selectedIndex].value,"");
		if (restore) selObj.selectedIndex=0;
	}
}

function relocate() {
//	alert('relocating '+relocDIVs.length+' layer...');
	for (i=1; i < relocDIVs.length; ++i) { // ab dem 2. Layer (i=1) muss geprueft werden
		var objDIV = document.getElementById(relocDIVs[i]); 
		mintop = objDIV.offsetTop;
//		alert('mintop['+relocDIVs[i]+']='+mintop);
		for (ii=0; ii < i; ++ii) { // alle Layer die vor dem Layer liegen prüfen
			var objPreDIV = document.getElementById(relocDIVs[ii]); 
//			alert('compare per>act '+mintop+'>'+objPreDIV.scrollHeight);
			if ((objPreDIV.offsetTop+objPreDIV.scrollHeight > mintop) && (objPreDIV.offsetLeft+objPreDIV.scrollWidth > objDIV.offsetLeft)) { // hier rechts links ergänzen
				mintop = objPreDIV.offsetTop+objPreDIV.scrollHeight
//				alert('change mintop['+relocDIVs[i]+']='+mintop);
			}
		}
		if (mintop != objDIV.offsetTop) {
			objDIV.style.top = mintop
//			alert('setting top['+relocDIVs[i]+']='+mintop);
		}
	}
}

function tmt_findObj(n){
	var x,t;
	if((n.indexOf("?"))>0&&parent.frames.length){
		t=n.split("?");
		x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{
		x=document.getElementById(n)
	}
	return x;
}

function wechsel(menu) {
	if (altmenu=="leer") {
		var verStr=navigator.appVersion, app=navigator.appName, version=parseFloat(verStr);
		if (app.indexOf('Microsoft') != -1) {
			var ie = 1, ns = 0;
    	}
		if (app.indexOf('Netscape') != -1) {
			if (version < 5) {
           		var ie = 0, ns = 1;
       		} else {
           		var ie = 1, ns = 0;
			}
		}
		if(ns) {
			document[altmenu].visibility="hide";
			document[menu].visibility="show";
		}
		if(ie) {
			var obj_neu=tmt_findObj(menu);
			var obj_alt=tmt_findObj(altmenu);
			obj_alt.style.visibility="hidden";
			obj_neu.style.visibility="visible";
		}
		altmenu = menu;
	} else {
		var menu = "leer";
		var verStr=navigator.appVersion, app=navigator.appName, version=parseFloat(verStr);
		if (app.indexOf('Microsoft') != -1) {
			var ie = 1, ns = 0;
    	}
		if (app.indexOf('Netscape') != -1) {
       		if (version < 5) {
           		var ie = 0, ns = 1;
       		} else {
				var ie = 1, ns = 0;
			}
		}
		if(ns) {
			document[altmenu].visibility="hide";
			document[menu].visibility="show";
			
		}
		if(ie) {
			var obj_neu=tmt_findObj(menu);
			var obj_alt=tmt_findObj(altmenu);
			obj_alt.style.visibility="hidden";
			obj_neu.style.visibility="visible";
		}
		altmenu = menu;
	}
}

var altmenu = "leer";

function showlayer(menu) {
	if (altmenu=="leer") {
		var verStr=navigator.appVersion, app=navigator.appName, version=parseFloat(verStr);
		if (app.indexOf('Microsoft') != -1) {
			var ie = 1, ns = 0;
    	}
		if (app.indexOf('Netscape') != -1) {
			if (version < 5) {
           		var ie = 0, ns = 1;
       		} else {
           		var ie = 1, ns = 0;
			}
		}
		if(ns) {
			document[altmenu].visibility="hide";
			document[menu].visibility="show";
			document[menu].zIndex=999;
		}
		if(ie) {
			var obj_neu=tmt_findObj(menu);
			var obj_alt=tmt_findObj(altmenu);
			obj_alt.style.visibility="hidden";
			obj_neu.style.visibility="visible";
			obj_neu.style.display="inline";
			obj_neu.style.zIndex=999;
		}
		altmenu = menu;
	} else {
		var menu = "leer";
		var verStr=navigator.appVersion, app=navigator.appName, version=parseFloat(verStr);
		if (app.indexOf('Microsoft') != -1) {
			var ie = 1, ns = 0;
    	}
		if (app.indexOf('Netscape') != -1) {
       		if (version < 5) {
           		var ie = 0, ns = 1;
       		} else {
				var ie = 1, ns = 0;
			}
		}
		if(ns) {
			document[altmenu].visibility="hide";
			document[menu].visibility="show";
			document[altmenu].zIndex=1;
		}
		if(ie) {
			var obj_neu=tmt_findObj(menu);
			var obj_alt=tmt_findObj(altmenu);
			obj_alt.style.visibility="hidden";
			obj_neu.style.visibility="visible";
			obj_alt.style.zIndex=1;
		}
		altmenu = menu;
	}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) {x.src=x.oSrc;};
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; 
	document.MM_sr=new Array; 
	for(i=0;i<(a.length-2);i+=3)
   		if ((x=MM_findObj(a[i]))!=null){
			document.MM_sr[j++]=x;
			if(!x.oSrc) x.oSrc=x.src
			x.src=a[i+2];}
}

function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS,rEvt) { //v4.01 // modified by aLEx 12.08.2003 -> added: rEvt (releaseEvents) to not handle events for a object after mouseUp was called
  //Copyright 1998 Macromedia, Inc. All rights reserved.
  var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
  var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;
  retVal = true; if(IE && event) event.returnValue = true;
  if (MM_dragLayer.arguments.length > 1) {
    curDrag = MM_findObj(objName); if (!curDrag) return false;
    if (!document.allLayers) { document.allLayers = new Array();
      with (document) if (NS4) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
        for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
          with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
      } else {
        if (NS6) { var spns = getElementsByTagName("span"); var all = getElementsByTagName("div"); 
          for (i=0;i<spns.length;i++) if (spns[i].style&&spns[i].style.position) allLayers[allLayers.length]=spns[i];}
        for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i]; 
    } }
    curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
    curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
    curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
    curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
    curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
    curDrag.MM_oldZ = (NS4)?curDrag.zIndex:curDrag.style.zIndex;
    curLeft= (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft; 
    if (String(curLeft)=="NaN") curLeft=0; curDrag.MM_startL = curLeft;
    curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop; 
    if (String(curTop)=="NaN") curTop=0; curDrag.MM_startT = curTop;
    curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop-cU;
    curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop+cD;
    curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
	if (rEvt == null) curDrag.rEvt=true; else curDrag.rEvt=rEvt;
	 // modified by aLEx 12.08.2003
    document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
    if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  } else {
    var theEvent = ((NS)?objName.type:event.type);
    if (theEvent == 'mousedown') {
      var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
      var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
      var maxDragZ=null; document.MM_maxZ = 0;
      for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
        var aLayerZ = (NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex);
        if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
        var isVisible = (((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
        if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
          var parentL=0; var parentT=0;
          if (NS6) { parentLayer = aLayer.parentNode;
            while (parentLayer != null && parentLayer.style.position) {             
              parentL += parseInt(parentLayer.offsetLeft); parentT += parseInt(parentLayer.offsetTop);
              parentLayer = parentLayer.parentNode;
          } } else if (IE) { parentLayer = aLayer.parentElement;       
            while (parentLayer != null && parentLayer.style.position) {
              parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
              parentLayer = parentLayer.parentElement; } }
          var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft);
          var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop) +parentT)+MM_hTop);
          if (String(tmpX)=="NaN") tmpX=0; if (String(tmpY)=="NaN") tmpY=0;
          var tmpW = MM_hWidth;  if (tmpW <= 0) tmpW += ((NS4)?clip.width :offsetWidth);
          var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS4)?clip.height:offsetHeight);
          if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
              || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
      if (curDrag) {
        document.onmousemove = MM_dragLayer; if (NS4) document.captureEvents(Event.MOUSEMOVE);
        curLeft = (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
        curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
        if (String(curLeft)=="NaN") curLeft=0; if (String(curTop)=="NaN") curTop=0;
        MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
        document.MM_curDrag = curDrag;  curDrag.MM_SNAPPED=false;
        if(curDrag.MM_toFront) {
          eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1');
          if (!curDrag.MM_dropBack) document.MM_maxZ++; }
        retVal = false; if(!NS4&&!NS6) event.returnValue = false;
    } } else if (theEvent == 'mousemove') {
      if (document.MM_curDrag) with (document.MM_curDrag) {
        var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
        var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
        newLeft = mouseX-MM_oldX; newTop  = mouseY-MM_oldY;
        if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
        if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
        if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
        if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
        MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
        if (NS4) {left = newLeft; top = newTop;}
        else if (NS6){style.left = newLeft; style.top = newTop;}
        else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
        if (MM_dragJS) eval(MM_dragJS);
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mouseup') {
      document.onmousemove = null;
      if (NS) document.releaseEvents(Event.MOUSEMOVE);
	  if (document.MM_curDrag.rEvt) { // modified by aLEx 12.08.2003
        document.onmouseup = null;
        document.onmousedown = null;
        if (NS) document.releaseEvents(Event.MOUSEUP);
        if (NS) document.releaseEvents(Event.MOUSEDOWN);
	  } else {
        if (NS) document.captureEvents(Event.MOUSEDOWN);} //for mac NS
      if (document.MM_curDrag) with (document.MM_curDrag) {
        if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
            (Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2)+
             Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol) {
          if (NS4) {left = MM_targL; top = MM_targT;}
          else if (NS6) {style.left = MM_targL; style.top = MM_targT;}
          else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
          MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
        if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
        if(MM_dropBack) {if (NS4) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
        retVal = false; if(!NS) event.returnValue = false; }
      document.MM_curDrag = null;
    }
    if (NS) document.routeEvent(objName);
  } return retVal;
}

function MM_dragLayer_disabled(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS,rEvt) { //v4.01 // modified by aLEx 12.08.2003 -> added: rEvt (releaseEvents) to not handle events for a object after mouseUp was called
	return true;
}

//--------------------- Tabsdefinition------------------------------------------
	var tabs_NS4 = (document.layers) ? 1 : 0;
	var tabs_IE = (document.all) ? 1 : 0;
	var tabs_DOM = 0;
	if (parseInt(navigator.appVersion) >=5) {tabs_DOM=1};

	var DIV, marke;
	var lastHeader = new Array;
	var currShow = new Array;
	//----------------------------------------------
	var Ar = new Array;
	var k = 0;
	for ( var i = 0; i < 100; i++ ) {
		Ar[i] = "";
	}
	//-----------------------------------------------
	function changeCont(tgt,header,myDIV) {
		target=(myDIV +'T' +tgt);
		//DIV = parseInt(myDIV);
		//---------------------------------------------? 
		DIV = 0;
		marke = 1;
		for ( var i = 0; i < 100; i++ ) {
			if (Ar[i] == myDIV) {
				DIV = i;
				marke = 0;	
			}
		}
		if (marke == 1) {
			for (var i=0; i<100; i++) {
				if (Ar[i] != "") k = k + 1;
			}
			Ar[k] = myDIV;
			DIV = k;
			marke = 0;
			k = 0;
		}
	
		//-----------------------------------------------?
		if (tabs_DOM) {
			// Hide the last one, and flip the tab color back.
			if (currShow[DIV]) {
				currShow[DIV].style.visibility="hidden";
			}
			if ( lastHeader[DIV] ) { 
				lastHeader[DIV].style.background = tab_off; 
				lastHeader[DIV].style.fontWeight="normal"; 
			}
			// Show this one, and make the tab silver
			var flipOn = document.getElementById(target);			
			flipOn.style.visibility="visible";
	
			var thisTab = document.getElementById(header);			
			thisTab.style.background = tab_on;
			thisTab.style.fontWeight = "bold";
	
			// Save for next go'round
			currShow[DIV]=document.getElementById(target);
			lastHeader[DIV] = document.getElementById(header);
	
			return false;
		}
		else if (tabs_IE) {
			// Hide the last one, and flip the tab color back.
						
			if (currShow[DIV]) {
				currShow[DIV].style.visibility = 'hidden';
			}
			if (lastHeader[DIV]) { 
				lastHeader[DIV].style.background = tab_off; 
				lastHeader[DIV].style.fontWeight="normal";
			}
			// Show this one, and make the tab silver
			document.all[target].style.visibility = 'visible';
			document.all[header].style.background = tab_on;
			document.all[header].style.fontWeight = 'bold';
			// Save for next go'round
						
			currShow[DIV]=document.all[target];
			lastHeader[DIV]=document.all[header];
	
			return false;
		}
		else if (tabs_NS4) {
			// Hide the last one, and flip the tab color back.
			currShow[DIV].visibility = 'hide';
			// if (lastHeader) { lastHeader.bgColor = tab_off; }
	
			// Show this one, and make the tab silver
			document.layers[target].visibility = 'show';
			// document.layers[header].bgColor  = tab_on;
	
			// Save for next go'round
			currShow[DIV]=document.layers[target];
			// lastHeader=document.layers[header];
	
			return false;
		}
		// && (version >=4)
		else {
			window.location=('#A' +target);
			return true;
		}
	}

	function DrawTabs(myDIV) {
		var output = '';
		//output += '<div id="tabstop" style="position:absolute; ';
		//output += 'left:' + left + 'px;';
		//output += 'top:' + top + 'px; ';
		//output += 'width:' + width + 'px; z-index:1;">\n';
		output += '<table border="0" cellpadding="0" cellspacing="0" bgcolor="white">\n';                    
		output += '<tr>\n';
		for ( var z = 1; z < rows.length; z++ ) {
			var tid = "tab" + z;
			var did = z;
			output += '<td id="'+myDIV+tid +'" class="tab-button" align="center" ><a href="#" onClick="changeCont(\'' + z + '\', \'' + myDIV +tid + '\', \''+myDIV+'\'); return false;" onFocus="if(this.blur)this.blur()">' + rows[z] + '</a></td>\n';
		}
		var t = 60;
		for ( var y = 1; y < t; y++ ) {
			output += '<td><img src="/img/grag_img/big_blank.gif"></td>\n';
		}
		output += '</tr>\n';
		output += '</table>\n';
		//output += '</div>\n\n';
			
		self.document.write(output);
	}
			
	function setActiveLayer(tgt,header,myDIV) { // bottom srcipt for tabed menus to set a layer active
		target=(myDIV +'T' +tgt);
		if (tabs_DOM) { currShow=document.getElementById(target);}
		else if (tabs_IE) { currShow=document.all[target];}
		else if (tabs_NS4) { currShow=document.layers[target];};       
		changeCont(tgt, header, myDIV);
	}
//---End of Tabsdefinition--------------------

//---Begin of Scrolldefinition----------------

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()


/*********************************************************************************
These are the variables you have to set:
*********************************************************************************/

//The speed of the timeout between each scroll.
timSpeed = 38

//The height of the container (change this when it scrolls to much or to little)
contHeight = 100

/*********************************************************************************
This is the object constructor function, which applies 
methods and properties to the Cross-browser layer object
*********************************************************************************/
function makeScrollObj(obj,nest){
	nest=(!nest) ? "":'document.'+nest+'.'
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
  	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;		
	this.height=bw.ns4?this.css.document.height:this.el.offsetHeight
	// for browser,can't handle the height-variable set height 500px
	//this.height=bw.ns4?this.css.document.height:1000
	this.top=b_gettop
	this.scrollTim=1
	this.name=''										
	return this
}


// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

//Getting the top for the top method
function b_gettop(){
	var gleft=(bw.ns4 || bw.ns6)?parseInt(this.css.top):eval(this.css.pixelTop);
	return gleft;
}
/*********************************************************************************
The scroll function. Checks what way to scroll and checks if the
layer is not already on top or bottom.
*********************************************************************************/
function scroll(obj,speed){
	clearTimeout(obj.scrollTim)
	way = speed>0?1:0
	if ((!way && obj.top()>-obj.height+contHeight) || (obj.top()<0 && way)){
		obj.css.top = (obj.top()+speed)+px;
		//obj.scrollTim = setTimeout(scroll("Q7vYx_oScroll,"+speed+");",timSpeed);
		//obj.scrollTim = setTimeout("alert("+obj+","+speed+");",timSpeed);
		obj.scrollTim = setTimeout("scroll("+obj.name+","+speed+")",timSpeed);
	}
}
//Clears the timeout so the scroll stops, this is called onmouseout.
function noScroll(obj){
	clearTimeout(obj.scrollTim)
}
//---Endof Scrolldefinition----------------


//---Begin of Date----------------
var monate=new Array
("January","February","March","April","May","June","July","August","September","October","November","December");

var wday=new Array
("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")

function neuzeit()
{
var zeit=new Date();
monat=monate[zeit.getMonth()];
tag=String(zeit.getDate());
wdays=wday[zeit.getDay()];
if(tag.length ==1)
{ tag=0+tag;}

jahr=zeit.getYear();

if(jahr<1900)
{
jahr=jahr+1900;
}

document.getElementById("uhr0").innerHTML=wdays+", "+tag+" "+ monat+" "+ jahr;
}
//---End of Date----------------

<!-- Start window popup by Dreamweaver
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// End of window popup by Dreamweaver-->

<!-- Start Slideshow window
function openSlideShow(theURL,winName,winWidth,winHeight,features) { //v2.0
  //alert("Slide show");

  winName = window.open(theURL,winName+'X',features);	
  winName.focus();
  winName.resizeTo(winWidth-10,winHeight);
}
//-->


// --------- Start Window - PopUp for Start Flash Site -----------------------------
// wrote by AlWach 15.12.2003
var win = null;
function newWindow(url,name,w,h) {
	if (w=='') br=613;
	if (h=='') ho=293;
	if (name=='') name='popup';
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	win = window.open(url,'',settings);
	win.window.focus();
}
// --------- End Window - PopUp -------------------------------

// --------- Start Window - PopUp(with special Settings) Site -----------------------------
// wrote by AlWach 16.12.2003
var win_pop = null;
function open_popup(url,name,w,h,features) {
	if (w=='') br=400;
	if (h=='') ho=600;
	if (name=='') name='popup';
	var winl = ((screen.width-w)/2)-5;
	var wint = 0;
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += features;
	win_pop = window.open(url,name,settings);
	win_pop.window.focus();
}
// --------- End Window - PopUp -------------------------------

// --------- Start Switch Layer to toggle DIV Layer visible or hidden ----
function DivSwitch(){
	var vis=(document.layers) ? ".visibility" : ".style.visibility";
	var fun=(document.getElementById) ? "tmt_findObj" : "MM_findObj";
	var args=DivSwitch.arguments;
	for(var i=0;i<args.length;i++){	
		if(eval(fun+"(args[i])")){
			var oldVis=eval(fun+"(args[i])"+vis);
			if(document.getElementById||document.all){
				var newVis=(oldVis=="hidden")?"visible":"hidden";
			}else{var newVis=(oldVis=="hide")?"show":"hide";}
			eval(fun+"(args[i])"+vis+"=newVis");}}
}
// --------- End Switch Layer

function tmt_showhideAll(c,n){ //'hidden' or 'visible'
	var v = (document.layers) ? ".visibility" : ".style.visibility";
	var arr = (document.layers) ? document.layers : (document.all) ? document.all.tags("DIV") : document.getElementsByTagName("DIV");
	for(var i=0;i<arr.length;i++){
		if (arr[i].id.indexOf(n) > -1) {
			eval("arr["+i+"]"+v+"='"+c+"'");
		}
	}
}

function ShowMenuDiv(dl_item,div_name,e) {
	tmt_showhideAll('hidden',div_name);
	if (!e) var e = window.event;
	div_name = dl_item.substring(0,dl_item.lastIndexOf("_")) + '_' + div_name;
	//alert(div_name);
	//alert(dl_item.substring(0,dl_item.lastIndexOf(":")));
   //alert(dl_item.substring(0,dl_item.lastIndexOf(":")))
   if (document.layers) {
        // When the page scrolls in Netscape, the event's mouse position
        // reflects the absolute position on the screen. innerHight/Width
        // is the position from the top/left of the screen that the user is
        // looking at. pageX/YOffset is the amount that the user has 
        // scrolled into the page. So the values will be in relation to
        // each other as the total offsets into the page, no matter if
        // the user has scrolled or not.
        xMousePos = e.pageX;
        yMousePos = e.pageY;
        xMousePosMax = window.innerWidth+window.pageXOffset;
        yMousePosMax = window.innerHeight+window.pageYOffset;
    } else if (document.all) {
        // When the page scrolls in IE, the event's mouse position 
        // reflects the position from the top/left of the screen the 
        // user is looking at. scrollLeft/Top is the amount the user
        // has scrolled into the page. clientWidth/Height is the height/
        // width of the current page the user is looking at. So, to be
        // consistent with Netscape (above), add the scroll offsets to
        // both so we end up with an absolute value on the page, no 
        // matter if the user has scrolled or not.
        xMousePos = window.event.x+document.body.scrollLeft;
        yMousePos = window.event.y+document.body.scrollTop;
        xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
        yMousePosMax = document.body.clientHeight+document.body.scrollTop;
    } else if (document.getElementById) {
        // Netscape 6 behaves the same as Netscape 4 in this regard 
		try {
			xMousePos = e.pageX;
        	yMousePos = e.pageY;
		} catch (ex) {}
        xMousePosMax = window.innerWidth+window.pageXOffset;
        yMousePosMax = window.innerHeight+window.pageYOffset;
    }
	//Div positionieren und ein bzw. ausblenden
	var vis=(document.layers) ? ".visibility" : ".style.visibility";
	var postop=(document.layers) ? ".top" : ".style.top";
	var posleft=(document.layers) ? ".left" : ".style.left";
	var fun=(document.getElementById) ? "tmt_findObj" : "MM_findObj";
	var args=DivSwitch.arguments;
	//for(var i=0;i<args.length;i++){	
		if(eval(fun+"(div_name)"))
		{
			var oldVis=eval(fun+"(div_name)"+vis);
			if(document.getElementById||document.all)
			{
				//var newVis=(oldVis=="hidden")?"visible":"hidden";
				var newVis="visible"
			}
			else
			{
				//var newVis=(oldVis=="hide")?"show":"hide";
				var newVis="show"				
			}
			try {
				if (!yMousePos) {eval(fun+"(div_name)"+postop+"="+yMousePos);}
				if (!xMousePos) {eval(fun+"(div_name)"+posleft+"="+xMousePos);}
			} catch (ex) {}
			eval(fun+"(div_name)"+vis+"=newVis");
		}
	//}
	
	//alert("xMousePos=" + xMousePos + ", yMousePos=" + yMousePos + ", xMousePosMax=" + xMousePosMax + ", yMousePosMax=" + yMousePosMax);
}

function PopUP_open(url_string,popup_string) {
	reWin = window.open(url_string,'',popup_string);
}

function delayhidemenu(e)
{
		delayhide=setTimeout("DivSwitch('" + e + "')",500)
}

function clearhidemenu()
{
	if (window.delayhide)
		clearTimeout(delayhide)
}

// name - name of the cookie
// value - value of the cookie
// [expires] - expiration date of the cookie (defaults to end of current session)
// [path] - path for which the cookie is valid (defaults to path of calling document)
// [domain] - domain for which the cookie is valid (defaults to domain of calling document)
// [secure] - Boolean value indicating if the cookie transmission requires a secure transmission
// * an argument defaults when it is assigned null as a placeholder
// * a null placeholder is not required for trailing omitted arguments
function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

// name - name of the desired cookie
// * return string containing value of specified cookie or null if cookie does not exist
function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

// name - name of the cookie
// [path] - path of the cookie (must be same as path used to create cookie)
// [domain] - domain of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds
function deleteCookie(name, path, domain) {
  if (getCookie(name, path, domain)) {
    document.cookie = name + "=" + 
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

// date - any instance of the Date object
// * hand all instances of the Date object to this function for "repairs"
function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

function MM_swapImageWithCookie() { //v3.0
  var i,j=0,x,a=MM_swapImageWithCookie.arguments; 
	document.MM_sr=new Array; 
	for(i=0;i<(a.length-2);i+=3)
   		if ((x=MM_findObj(a[i]))!=null){
			document.MM_sr[j++]=x;
			if(!x.oSrc) x.oSrc=x.src
			x.src=a[i+2];
			setCookie(a[i],a[i+2]);}
}

function MM_restoreImageByCookie() { //v3.0
  var i,j=0,x,a=MM_restoreImageByCookie.arguments; 
	document.MM_sr=new Array; 
	for(i=0;i<(a.length-2);i+=3)
   		if ((x=MM_findObj(a[i]))!=null){
			document.MM_sr[j++]=x;
			if(!x.oSrc) x.oSrc=x.src
			x.src=cookieImgSrc(a[i],a[i+2]);}
}

function cookieImgSrc(imgName,imgSrc) {
	var imgCookieSrc = getCookie(imgName);
	if (!imgCookieSrc) {
		setCookie(imgName,imgSrc);
		return imgSrc;
	} else {
		return imgCookieSrc;
	}
}

function getCookieLogin(name) {
	var re = new RegExp(name + '=([^;]+)');
	var value = re.exec(document.cookie);
//	return (value != null) ? unescape(value[1]) : null;
	return (value != null) ? unescape(value[1]) : getCookieLogin.arguments[1];
}

function setCookieLogin(name, value) {
	var today = new Date();
	var expiry = new Date(today.getTime() + 20000);
	document.cookie=name + '=' + escape(value) + '; path=/ ; expires=' + expiry.toGMTString();
}

function delCookieLogin(name) {
	var today = new Date();
	var expiry = new Date(today.getTime() -1);
	document.cookie=name + '=null' + '; expires=' + expiry.toGMTString();
}


function formHandler(form) {
var windowprops = "height=600,width=800,toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1";
var URL = form.site.options[form.site.selectedIndex].value;
popup = window.open(URL,"MenuPopup",windowprops);
}


function popupPage() {
var page = "http://www.fiba.com/subsites/2006_jpn_draw/draw_jpn_live_vide.html";
windowprops = "height=480,width=640,location=no,"
+ "scrollbars=no,menubars=no,toolbars=no,resizable=no";

window.open(page, "Popup", windowprops);
}

/*function linkPageArg(URLstr, parameter) {
	parameter = parameter || "&linkFibaPage=";
	var strLinkRef = location.href
	strLinkRef = strLinkRef.replace(/www\-31/g,"www");
	strLinkRef = strLinkRef.replace(/www\-32/g,"www");
	strLinkRef = strLinkRef.replace(/www\-33/g,"www");
	strLinkRef = strLinkRef.replace(/ri\-31/g,"www");
	strLinkRef = strLinkRef.replace(/cache\./g,"");
	strLinkRef = strLinkRef.replace(/\(arg\)/g,"(argarg)");
	strLinkRef = strLinkRef.replace(/\(and\)/g ,"(andand)");
	strLinkRef = strLinkRef.replace("?","(arg)");
	strLinkRef = strLinkRef.replace(/&/g ,"(and)");
	document.location =	URLstr + parameter + strLinkRef;
}*/

function linkPageArg(URLstr, parameter) {
	parameter = parameter || "&linkFibaPage=";
	parameter = parameter.replace('&','').replace('=','');
	var strLinkRef = location.href;
	strLinkRef = strLinkRef.replace(/www\-31/g,"www");
	strLinkRef = strLinkRef.replace(/www\-32/g,"www");
	strLinkRef = strLinkRef.replace(/www\-33/g,"www");
	strLinkRef = strLinkRef.replace(/ri\-31/g,"www");
	strLinkRef = strLinkRef.replace(/cache\./g,"");
	//URLstr = URLstr.substring(0,URLstr.lastIndexOf('/')) + encodeURIComponent(strLinkRef) + '/' + URLstr.substring(URLstr.lastIndexOf('/')+1);
	//alert(document.cookie);
	setCookie("linkFibaPage",strLinkRef,null, "/");
	document.location.href = URLstr;
}

function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}

function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

function redirectPost(form) {
	if (Left(form.action, 4) != '/ce/') {
		form.action = '/ce' + form.action;
	}
}

function drawTable (arrayName, tableTitle) { 
	var cssclass = 'even';
	rssFeed = arrayName;
	table = "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"1\" border=\"0\" class=\"contentTable\"> 	<thead> 		<tr> 			<td height=\"20\">" + tableTitle +  "</td> 		</tr> 		<tr class=\"spacer\"> 			<td><img src=\"/img/fe/blank.gif\" width=\"1\" height=\"1\" /></td> 		</tr> 	</thead> 	<tbody>";
	
	for (var x = 0; x<rssFeed.length; x++)
		{
			//<!-- defines whether this is a odd or even row //-->
			if (x%2 == 0) { 
				cssclass = 'even';
			} else {
				cssclass = 'odd';
			}
			table += "" +
				"<tr class=\"" + cssclass + "\">" +
				"	<td width=\"100%\" valign=\"middle\">" +
				"		<div class=\"cssTitle\">" +
				"			<a href=\"http://" + rssFeed[x][1] + "\" target=\"new\">" + rssFeed[x][0] + "</a>" +
				"		</div> " +
				"		<div class=\"rssIcon\">" +
				"			<a href=\"http://" + rssFeed[x][1] + "\" target=\"new\">" +
				"				<img src=\"http://www.fiba.com/images/web/V3_News/newsFeed/_original/buRss2.gif\" width=\"28\" height=\"13\" border=\"0\" alt=\"RSS Feed\" align=\"absMiddle\" />" +
				"			</a> " +
				"			<a href=\"javascript:showEL('info" + x + "');\" id=\"moreinfo" + x + "\" showEL=\"show('info" + x + "');\">" +
				"				<img src=\"http://www.fiba.com/images/web/V3_News/newsFeed/_original/addToRead.gif\" width=\"86\" height=\"14\" border=\"0\" alt=\"RSS Feed\" align=\"absMiddle\" />" +
				"			</a>" +
				"		</div>" +
				"		<div style=\"height: 40px; display: none;\" id=\"info" + x + "\">" +
				"			<br />" +
				"			<a href=\"http://fusion.google.com/add?feedurl=http%3a//" + rssFeed[x][1] + "\" target=\"new\">" +
				"				<img src=\"http://www.fiba.com/images/web/V3_News/newsFeed/_original/addGoogle.gif\" width=\"92\" height=\"15\" border=\"0\" alt=\"Add to my Google\" align=\"absMiddle\" />" +
				"			</a> " +
				"			<a href=\"http://add.my.yahoo.com/content?url=http%3a//" + rssFeed[x][1] + "\" target=\"new\">" +
				"				<img src=\"http://www.fiba.com/images/web/V3_News/newsFeed/_original/addYahoo.gif\" width=\"80\" height=\"15\" border=\"0\" alt=\"Add to my yahoo\" align=\"absMiddle\" />" +
				"			</a> " +
				"			<a href=\"http://my.msn.com/addtomymsn?id=rss&ut=http%3a//" + rssFeed[x][1] + "\" target=\"new\">" +
				"				<img src=\"http://www.fiba.com/images/web/V3_News/newsFeed/_original/addMsn.gif\" width=\"71\" height=\"15\" border=\"0\" alt=\"Add to my msn\" align=\"absMiddle\" />" +
				"			</a> " +
				"			<a href=\"http://feeds.my.aol.com/add.jsp?url?http%3a//" + rssFeed[x][1] + "\" target=\"new\">" +
				"				<img src=\"http://www.fiba.com/images/web/V3_News/newsFeed/_original/addAol.gif\" width=\"63\" height=\"15\" border=\"0\" alt=\"Add to my Aol\" align=\"absMiddle\" />" +
				"			</a>" +
				"			<br />" +
				"		</div>" +
				"	</td>" +
				"</tr>";
	   }
	table += "</tbody> 	<tfoot> 		<tr class=\"spacer\"> 			<td><img src=\"/img/fe/blank.gif\" width=\"1\" height=\"1\" /></td> 		</tr> 		<tr class=\"endBar\"> 			<td><img src=\"/img/fe/blank.gif\" width=\"1\" height=\"1\" /></td> 		</tr> 	</tfoot> </table>";
	return table;
}

// show-id "add to my reader" div in RSS feed page
function showEL(id)
{
	for (var y = 0; y<rssFeed.length; y++) {
			el = document.getElementById("info" + y);
			el.style.display = 'none';
		}

	el = document.getElementById(id);
	if (el.style.display == 'none')
	{
		el.style.display = '';
	} else {

		el.style.display = 'none';
	}
}


//var IntNewsRssFeed = new Array ();
//			IntNewsRssFeed[0] = new Array("International Basketball (All feeds)", "www.fiba.com/subsites/rss/teaser_content_rss.asp?cat_news=8");
//			IntNewsRssFeed[1] = new Array("Argentina", "www.fiba.com/arg");
//			IntNewsRssFeed[2] = new Array("France", "www.fiba.com/fra");
//			IntNewsRssFeed[3] = new Array("Germany", "www.fiba.com/ger");

// tab navigation for VIDEO page

/*
 * domTab.js
 * version 2.2
 * written by Chris Heilmann
 * more info: http://www.onlinetools.org/tools/domtab.php
*/

// Global variables
var currentTab,currentLink;

// Change if you want to use another class for highlighting
var tabHighlightClass='tabon';

function initTabs()
{
// change if you have another main navigation ids for tabbed or normal element id
	var navElement='mainnav';
	var navElementTabbedId='mainnavtabbed';

// pattern to check against to identify "back to menu" links
	var backToMenu=/#top/;

	var n,as,id,i,cid,linklength,lastlink,re;
	if(document.getElementById && document.createTextNode)
	{
		cid=window.location.toString().match(/#(\w.+)/);
		if (cid && cid[1])
		{
			cid=cid[1];
		}
		var n=document.getElementById(navElement);
		n.id=navElementTabbedId;
		n=document.getElementById(navElementTabbedId)
		var as=n.getElementsByTagName('a');
		for (i=0;i<as.length;i++)
		{
			as[i].onclick=function(){showTab(this);return false}
			//as[i].onkeypress=function(){showTab(this);return false}
			id=as[i].href.match(/#(\w.+)/)[1];
			if(!cid && i==0)
			{
				currentTab=id;
				currentLink=as[i];
			} else if(id==cid)
			{
				currentTab=id;
				currentLink=as[i];
			}
			if(document.getElementById(id))
			{
				linklength=document.getElementById(id).getElementsByTagName('a').length;
				if(linklength>0)
				{
					lastlink=document.getElementById(id).getElementsByTagName('a')[linklength-1]
					if(backToMenu.test(lastlink.href))
					{
						lastlink.parentNode.removeChild(lastlink);
					}
				}
				document.getElementById(id).style.display='none';
			}
			if(cid){window.location.hash='top';}
		}		


		if(document.getElementById(currentTab))
		{
			document.getElementById(currentTab).style.display='block';
		}
		re=new RegExp('\\b'+tabHighlightClass+'\\b');
		if(!re.test(currentLink.className))
		{
			currentLink.className=currentLink.className+' '+tabHighlightClass
		}
	}
}  
function showTab(o)
{
	var id;
	if(currentTab)
	{
		if(document.getElementById(currentTab))
		{
			document.getElementById(currentTab).style.display='none';
		}
		currentLink.className=currentLink.className.replace(tabHighlightClass,'')
	}
	var id=o.href.match(/#(\w.+)/)[1];
	currentTab=id;
	currentLink=o;
	if(document.getElementById(id))
	{
		document.getElementById(id).style.display='block';
	}
	var re=new RegExp('\\b'+tabHighlightClass+'\\b');
	if(!re.test(o.className))
	{
		o.className=o.className+' '+tabHighlightClass
	}
}

function submitForm(form,args,friendly) {
	if (typeof form == 'string') form = document.forms[form];
	if (args == null) {
		form.submit();
	} else {
		if (form.method == 'get') {
			var url = form.action;
			var params = '';
			for (var iEl = 0; iEl < form.elements.length; iEl++) {
				var key = form.elements[iEl].name.toLowerCase();
				if (args[key]) {
//					alert(key + ' --> in');
					if ((form.elements[iEl].type != 'radio' && form.elements[iEl].type != 'checkbox') || form.elements[iEl].checked) {
						if (args[key] == '') {args[key] = key;};
						var argValue = form.elements[iEl] == null ? '' : encodeURIComponent(form.elements[iEl].value);
						if (friendly) {
							params += args[key] + '/' + argValue + '/';
						} else {
							params += args[key] + '=' + argValue + '&';
						};
					};
//				} else {
//					alert(key + ' --> not in');
				};
			};
//			for (var key in args) {
//				if (args[key] == '') {args[key] = key;};
//				var argValue = form.elements[args[key]] == null ? '' : form.elements[args[key]].value;
//				if (friendly) {
//					params += key + '/' + argValue + '/';
//				} else {
//					params += key + '=' + argValue + '&';
//				};
//			};
			if (params != '') {if (!friendly) {params = '?' + params;} else {params += '/';};};
		
			if (friendly) {
				url = url.substring(0,url.lastIndexOf('/')+1) + 'p/' + params.substring(0,params.length-1)  + url.substring(url.lastIndexOf('/')+1,url.lastIndexOf('.')+1) + 'html'
			} else {
				url += params.substring(0,params.length-1)
			};
			window.open(url, form.target || '_self');
			/*switch (form.target) {
				case '_top': window.document.location.href = url; break;
				case '_parent': (parent || self).document.location.href = url; break;
				case '': document.location.href = url; break;
				case '_blank': window.open(url, ''); break;
				default: window.open(url, form.target); break;
			};*/
		} else {
			for (var iEl = 0; iEl < form.elements.length; iEl++) {
				var key = form.elements[iEl].name.toLowerCase();
				if (args[key]) {
//					alert(key + ' --> in');
					if (args[key] == '') {args[key] = key;};
					form.elements[iEl].name = args[key];
//				} else {
//					alert(key + ' --> not in');
				};
			};
//			for (var iEl = 0; iEl < form.elements.length; iEl++) {
//				alert('new name: ' + form.elements[iEl].name);
//			};
			if ((form.action.indexOf('/pages/') >= 0) && (form.action.indexOf('/ce/pages/') == -1)) {
				form.action = form.action.replace('/pages/','/ce/pages/');
			}
			form.submit();
		};

	};
	return false;
}

/**** javascript slide show HALL of FAME *****/


/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["http://www.fiba.com/images/web/v3_hof/inductees/coaches/_192/DiAZ_MIGUEL_o.jpg", "/pages/eng/hof/indu/list200722691824724.asp", ""] //plain image syntax
fadeimages[1]=["http://www.fiba.com/images/web/v3_hof/inductees/players/COSIC_Kresimir/_192/cosic_o.jpg", "/pages/eng/hof/indu/list.asp", ""]
fadeimages[2]=["/images/web/v3_hof/inductees/referees/_192/BELOSEVIC_o.jpg", "/pages/eng/hof/indu/refeList.asp", ""] 
fadeimages[3]=["/images/web/v3_hof/inductees/referees/_192/KOSTIN_o.jpg", "/pages/eng/hof/indu/refeList.asp", ""] 
fadeimages[4]=["/images/web/v3_hof/inductees/referees/_192/REVERBERI_o.jpg", "/pages/eng/hof/indu/refeList.asp", ""] 
fadeimages[5]=["/images/web/v3_hof/inductees/referees/_192/RIGHETTO_o.jpg", "/pages/eng/hof/indu/refeList.asp", ""] 
fadeimages[6]=["/images/web/v3_hof/inductees/coaches/_192/PRIMO_o.jpg", "/pages/eng/hof/indu/list200722691824724.asp", ""] 
fadeimages[7]=["/images/web/v3_hof/inductees/coaches/_192/NIKOLIC_O.jpg", "/pages/eng/hof/indu/list200722691824724.asp", ""] 
fadeimages[8]=["/images/web/v3_hof/inductees/coaches/_192/KONDRASHIN_o.jpg", "/pages/eng/hof/indu/list200722691824724.asp", ""] 
fadeimages[9]=["/images/web/v3_hof/inductees/coaches/_192/IBA_o.jpg", "/pages/eng/hof/indu/list200722691824724.asp", ""] 
fadeimages[10]=["/images/web/v3_hof/inductees/coaches/_192/GOMELSKY_o.jpg", "/pages/eng/hof/indu/list200722691824724.asp", ""] 
fadeimages[11]=["/images/web/v3_hof/inductees/players/BELOV_Alexander/_192/belov_o.jpg", "/pages/eng/hof/indu/list200722691824724.asp", ""] 
fadeimages[12]=["/images/web/v3_hof/inductees/players/CRUZ_Teofilo/_192/cruz_o.jpg", "/pages/eng/hof/indu/list.asp", ""]
fadeimages[13]=["/images/web/v3_hof/inductees/players/DELIBASIC_Mirza/_192/DELIBASIC_o.jpg", "/pages/eng/hof/indu/list.asp", ""]
fadeimages[14]=["/images/web/v3_hof/inductees/players/KORAC_Radivoj/_192/KORAC_o.jpg", "/pages/eng/hof/indu/list.asp", ""]
fadeimages[15]=["/images/web/v3_hof/inductees/players/MARTIN_Fernando/_192/MARTiN_o.jpg", "/pages/eng/hof/indu/list.asp", ""]
fadeimages[16]=["/images/web/v3_hof/inductees/players/PETROVIC_Drazen/_192/PETROVIC_o.jpg", "/pages/eng/hof/indu/list.asp", ""]
fadeimages[17]=["/images/web/v3_hof/inductees/players/RONCHETTI_Lilian/_192/RONCHETTI_o.jpg", "/pages/eng/hof/indu/list.asp", ""]
fadeimages[18]=["/images/web/v3_hof/inductees/players/VOYNOVA_Vanya/_192/VOYNOVA_o.jpg", "/pages/eng/hof/indu/list.asp", ""]
fadeimages[19]=["/images/web/v3_hof/inductees/contributors/_192/WAHBY_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[20]=["/images/web/v3_hof/inductees/contributors/_192/UEDA_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[21]=["/images/web/v3_hof/inductees/contributors/_192/STEITZ_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[22]=["/images/web/v3_hof/inductees/contributors/_192/SHAPER_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[23]=["/images/web/v3_hof/inductees/contributors/_192/SEMASHKO_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[24]=["/images/web/v3_hof/inductees/contributors/_192/SCURI_5.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[25]=["/images/web/v3_hof/inductees/contributors/_192/SAPORTA_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[26]=["/images/web/v3_hof/inductees/contributors/_192/POPOVIC_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[27]=["/images/web/v3_hof/inductees/contributors/_192/PITZL_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[28]=["/images/web/v3_hof/inductees/contributors/_192/NAISMITH_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[29]=["/images/web/v3_hof/inductees/contributors/_192/lopez_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[30]=["/images/web/v3_hof/inductees/contributors/_192/KOZLOWSKI_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[31]=["/images/web/v3_hof/inductees/contributors/_192/HEPP_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[32]=["/images/web/v3_hof/inductees/contributors/_192/GREIM_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[33]=["/images/web/v3_hof/inductees/contributors/_192/DUK-JOO_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[34]=["/images/web/v3_hof/inductees/contributors/_192/DR.JONES_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[35]=["/images/web/v3_hof/inductees/contributors/_192/DOS-REIS_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[36]=["/images/web/v3_hof/inductees/contributors/_192/CALVO_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[37]=["/images/web/v3_hof/inductees/contributors/_192/BUSNEL_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[38]=["/images/web/v3_hof/inductees/contributors/_192/BOUFFARD_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[39]=["/images/web/v3_hof/inductees/contributors/_192/ASHRY_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[40]=["/images/web/v3_hof/inductees/contributors/_192/ATAKOL_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[41]=["/images/web/v3_hof/inductees/contributors/_192/AIRALDI_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
fadeimages[42]=["/images/web/v3_hof/inductees/contributors/_192/CARNEIRO_o.jpg", "/pages/eng/hof/indu/contList.asp", ""]
 
 
var fadebgcolor="white"
 
////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
 
function checkYearSearch(stringIDFrom,stringIDTo,wherefrom)
{
	if(document.getElementById(stringIDFrom).selectedIndex <document.getElementById(stringIDTo).selectedIndex)
	{
		if(wherefrom == 0)
			document.getElementById(stringIDTo).selectedIndex = document.getElementById(stringIDFrom).selectedIndex
		else
			document.getElementById(stringIDFrom).selectedIndex = document.getElementById(stringIDTo).selectedIndex		
	}
}

/*
 *	FUNCTION SET:
 *		- charcter encoding
 */

/***************************************************************************************
 * Encodes a string to fit into argument of an HTML item . e.g.: title or alt of <img> *
 ***************************************************************************************/
function encodeItemArumentHTML(str) {
	str = str.replace(/&/g,"&amp;");
	str = str.replace(/</g,"&lt;");
	str = str.replace(/>/g,"&gt;");
	str = str.replace(/"/g,"&quot;");
	return str
};

/***************************************************************************************
 * change &amp; to &, when using paramters in URL *
 ***************************************************************************************/
function decodeXHTMLURL(str) {
	str = str.replace(/&amp;/g,"&");
	return str
};

/*
 *	FUNCTION SET:
 *		- store and apply current window scroll possition
 *		- added for functionality "Scroll to the last window possition if a page reloads due to userinteraction"
 */

/*****************************************************
 * save current window scroll possition in a cookie *
 *****************************************************/
function saveWinScroll(pageID) {
	if (!(pageID > 0)) {pageID = intPageID;};
	setCookie('cXYpID',pageID,'','/');
	setCookie('cXY',getScrollXY().join('|'),'','/');
};

/********************************************************
 * apply the window scroll possition stored in a cookie *
 ********************************************************/
function applyWinScroll(pageID) {
	if (!(pageID > 0)) {pageID = intPageID;};
	if (getCookie('cXYpID') == pageID) {
		var arrPos = getCookie('cXY').split('|');
		setScrollXY(arrPos[0],arrPos[1]);
	};
	/* deleted cookies seems to fill up the browser until the session ends; we do not need to delete them anyway as they are set again on each page on exit
	deleteCookie('cXYpID','/');
	deleteCookie('cXY','/');
	*/
};

/**********************************************
 * retrieve the current window sroll position *
 **********************************************/
function getScrollXY() {
    var x = 0, y = 0;
    if( typeof( window.pageYOffset ) == 'number' ) {
        // Netscape
        x = window.pageXOffset;
        y = window.pageYOffset;
    } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
        // DOM
        x = document.body.scrollLeft;
        y = document.body.scrollTop;
    } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
        // IE6 standards compliant mode
        x = document.documentElement.scrollLeft;
        y = document.documentElement.scrollTop;
    };
    return [x, y];
};

/************************************
 * retrieve the current window size *
 ************************************/
function getWindowSize() {
	var x = 0, y = 0;
	if( typeof( window.outerWidth ) == 'number' ) {
		//Non-IE outerWidth
		x = window.outerWidth;
		y = window.outerHeight;
	} else if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		x = window.innerWidth;
		y = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	};
	return [x, y];
}

/******************************************************
 * apply/set/change the current window sroll position *
 ******************************************************/
function setScrollXY(x, y) {
    window.scrollTo(x, y);
};

/*
 *	FUNCTION SET:
 *		- to change to possition of an page object (e.g.: DIV) in relation to the current window scroll position
 *		- currently this set has only a function to move an object as many pixels down as the page was scrolled down
 *		- added for functionality "centered loading DIV after the user scrolled down"
 */

/**************************************************************************
 * moves an object/element (by ID) as far down as the window was scrolled *
 * ! do not use this twice on the same object !                           *
 **************************************************************************/
function applyScrollPosToObject(objID) {
	var objToMove = document.getElementById(objID)
	if(objToMove) {
		var arrPos = getScrollXY();
		objToMove.style.display = 'block';
		objToMove.style.top = findPosY(objToMove) + arrPos[1];
	};
};
/* same function as applyScrollPosToObject: using a fixed position rather than finding the obejects position on runtime */
function applyScrollPosToObjectPos(objID,objPos,boolCenter) {
	var objToMove = document.getElementById(objID)
	if(objToMove) {
		var arrPos = getScrollXY();
		var arrSize = getWindowSize();
		objToMove.style.display = 'block';
		objToMove.style.top = objPos + arrPos[1]+'px';;
		if (boolCenter) {
			objToMove.style.left = parseInt((arrSize[1]/2)+(objToMove.style.width/2))+'px';
		}
	};
};

/************************************************************************
 * returns the abolute X (horizontal/left) possition of an given object *
 ************************************************************************/
function findPosX(obj) {
	var curleft = 0;
	if(obj.offsetParent)
		while(1) {
			curleft += obj.offsetLeft;
			if(!obj.offsetParent)
				break;
			obj = obj.offsetParent;
		}
	else if(obj.x)
		curleft += obj.x;
	return curleft;
};

/*********************************************************************
 * returns the abolute Y (vertical/top) possition of an given object *
 *********************************************************************/
function findPosY(obj) {
	var curtop = 0;
	if(obj.offsetParent)
		while(1) {
			curtop += obj.offsetTop;
			if(!obj.offsetParent)
				break;
			obj = obj.offsetParent;
		}
	else if(obj.y)
		curtop += obj.y;
    return curtop;
};

/****************************************************************************************************************************************************************
 * adds a dummy DIV for a "loading..." notification to the page; this will be triggered when leaving the page; it is shown until the next page finished loading *
 ****************************************************************************************************************************************************************/
function includeLoadingDIV() {
	document.write('<div id="waitWhileLoading" class="loading"></div>');
};

/***************************************
 * easy replace all ocurence in string *
 ***************************************/
function globalStrReplace(str,strToReplace,strReplaceWith,strFlags) {
	return str.replace(new RegExp(strToReplace.replace(/([\^\$\\\.\+\*\?\{\}\(\)\|\[\]])/g,'\\$1'),strFlags),strReplaceWith)
};

/*********
 * Debug *
 *********/
function debugOut(strMSG,typeMSG,objMSG) {
	if (boolShowDebug) {
		if (!(navigator.appName=='Microsoft Internet Explorer')) {
			try {
				switch(typeMSG) {
					case 1:
						console.info(strMSG,objMSG);
						break;    
					case 2:
						console.warn(strMSG,objMSG);
						break;    
					case 3:
						console.error(strMSG,objMSG);
						break;    
					case 4:
						console.debug(strMSG,objMSG);
						break;    
					default:
						console.log(strMSG,objMSG);
				};
			} catch(err) {
				//Handle errors here
			};
		};
	};
};

/******************
 * Image for Text *
 * REQUIRES: <script src="/javascripts/framework/htmlEncode.js" type="text/javascript"></script>
 *****************/
 function textToGraphics(strText,strPath,intCacheTime,strFontName,intFontSize,strFontStyle,strFontColor,strBackGroundColor,intWidth,intHeight,intXOffSet,intYOffSet,strImgType,strOverWriteTextParams,boolAsStream,fn,strFontNameAlternative,lc,strRegEx)
 {
	strText = strText || "";
	strPath = strPath || "";
	intCacheTime = intCacheTime || "";
	strFontName = strFontName || "";
	intFontSize = intFontSize || "";
	strFontStyle = strFontStyle || "";
	strFontColor = strFontColor || "";
	strBackGroundColor = strBackGroundColor || "";
	intWidth = intWidth || "0";
	intHeight = intHeight || "0";
	intXOffSet = intXOffSet || "0";
	intYOffSet = intYOffSet || "0";
	strImgType = strImgType || "";
	strOverWriteTextParams = strOverWriteTextParams || "";
	fn = fn || "";
	strFontNameAlternative = strFontNameAlternative || "";
	lc = lc || "";
	strRegEx = strRegEx || "";
	return '<img src="/pages/mod/v4/pictures/textToGraphic.asp?a='+escape(htmlEncode(strText))+'&amp;a1='+escape(strPath)+'&amp;a2='+escape(intCacheTime)+'&amp;a3='+escape(strFontName)+'&amp;a4='+escape(intFontSize)+'&amp;a5='+escape(strFontStyle)+'&amp;a6='+escape(strFontColor)+'&amp;a7='+escape(strBackGroundColor)+'&amp;a8='+escape(intWidth)+'&amp;a9='+escape(intHeight)+'&amp;a10='+escape(intXOffSet)+'&amp;a11='+escape(intYOffSet)+'&amp;a12='+escape(strImgType)+'&amp;a13='+escape(strOverWriteTextParams)+'&amp;a14='+escape(boolAsStream)+'&amp;b1='+escape(fn)+'&amp;b2='+escape(strFontNameAlternative)+'&amp;b3='+escape(lc)+'&amp;b4='+escape(strRegEx)+'&amp;c=HTML" alt="'+encodeItemArumentHTML(strText)+'" title="'+encodeItemArumentHTML(strText)+'" />';
 }

/*******************************
 * Adding element to selectbox *
 *******************************/
function addSelectOption(selectionElement, text)
{
	var option = document.createElement("OPTION");
	var Text = document.createTextNode(text);
	option.appendChild(Text);
	selectionElement.appendChild(option);
}

/*****************************************
 *Get Country by JSon and fill selectbox *
 *****************************************/

function fillCountrySelect(url,boxid)
{
	var CountryArray = new Array();
	new Ajax.Request	(
							url,
							{
								method		: 'get',
								onSuccess	: function(transport)
								{
									CountryArray = transport.responseText.evalJSON(true);
									/* Would be more peformant, but does not work properly
									for each (var _item in CountryArray)
									{
										console.log(_item);
										addSelectOption(document.getElementById(boxid),_item.name);	
									}
									*/
									for (var csi = 0; csi <= CountryArray.country_name.length; csi++)
									{
										addSelectOption(document.getElementById(boxid),CountryArray.country_name[csi].name)											
									}
									this.ready = true;
								}
							}
						);
}

function setCSSclass(strElementId, intToDo /*1 change, 2 change back / undo last, 3 add, 4 remove*/, strClass) {
	var obj = document.getElementById(strElementId)
	var strCurrentClassName = obj.className
	switch(intToDo) {
		case 1:
			obj.setAttribute('cssclass',strCurrentClassName);
			obj.className = strClass;
			break;    
		case 2:
			if (obj.getAttribute('cssclass')) {
				obj.className = obj.getAttribute('cssclass');
			} else if (strClass){
				//obj.setAttribute('cssclass',strCurrentClassName);
				//obj.className = strClass;
			};
			break;    
		case 3:
			if (strCurrentClassName.indexOf('strClass') < 1) { /* add only if not yet in */
				obj.setAttribute('cssclass',strCurrentClassName);
				obj.className = strCurrentClassName + ' ' + strClass;
			}
			break;    
		case 4:
			if (strClass) { /* remove this string */
				obj.setAttribute('cssclass',strCurrentClassName);
				obj.className = globalStrReplace(strCurrentClassName,strClass,'','g');
			} else if (obj.getAttribute('cssclass')) { /* go back to the last setting */
				obj.className = obj.getAttribute('cssclass');
			};
			break;    
		default:
			return false;
	};
	return true;
};

//function which creates an unique number with every call. Combination of two random Numbers between 1 and 10000 and the actual millisecond time.
function get_unique_view_counter_identifier()
{
	var randnumb1 = Math.random();
	var randnumb2 = Math.random();
	var millitime = new Date();
	return 'randomvalue='+String(randnumb1)+String(randnumb2)+String(millitime.getTime());
}

//builds and ecrm parameter string which is needed for counting the pageview. String is written in logfile, and then interpreted
function viewcounter(stID,objID,lID,lc)
{
	//langID and/or langCode is optional
	lID = lID || '';
	lc = lc || '';
	
	var imgparam = '?ecrm=';
	//Cookie, which stores userID und and User CountryCode
	if(document.cookie)
	{     
		if(getCookie('CuID'))
			imgparam+=getCookie('CuID')+'|';
		else
			imgparam+='|';
		if(getCookie('CuCC'))
			imgparam+=getCookie('CuCC')+'|';
		else
			imgparam+='|';
	}
	else
		imgparam+='||';
	//Parameter given from viewed page		
	imgparam+=stID+'|';			
	imgparam+=objID+'|';			
	imgparam+=lID+'|';			
	imgparam+=lc;		
	//adding unique identifier Number to force reload
	imgparam+='&'+get_unique_view_counter_identifier();
	return imgparam;
}


//shows all divs with given classname
function showDiv(classname)
{

	getElementsByClassName(document,"div",classname).each(
		function(item)
		{
			item.style.display = '';
		}
	);
}

//help function, gets all elements for classname
function getElementsByClassName(oElm, strTagName, strClassName){
	var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	strClassName = strClassName.replace(/\-/g, "\\-");
	//var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
	var oRegExp = new RegExp("(\\b" + strClassName + "\\b)");
	var oElement;
	for(var i=0; i<arrElements.length; i++){
		oElement = arrElements[i];
		if(oRegExp.test(oElement.className)){
			arrReturnElements.push(oElement);
		}
	}
	return (arrReturnElements)
}

//standard repclace classname in div
function replaceClassName(oldname,newname){
	var arrElements = document.getElementsByTagName('div');
	var oRegExp = new RegExp("(\\b" + oldname + "\\b)");
	var oElement;
	for(var i=0; i<arrElements.length; i++){
		oElement = arrElements[i];
		if(oRegExp.test(oElement.className)){
			oElement.className=newname;
		}
	}
}
