﻿var onLoadObj = new Array();	// array where you can put in javascript functions (as strings) to be executed onLoad
var bodyObj = new Array();
var popUps  = new Array();	// popup-windows
var is = new checkBrowser();	// Browser-check object

if(!is.support && UnSupportedBrowserRedirectURL!='') self.location.href(UnSupportedBrowserRedirectURL);


function doResize(){
  window.document.location.reload();
}
function altNSHandler(e){
  routeEvent(e);
}

function onLoadHandler(){
	//alert(onLoadObj.length);
	for (var i = 0; i < onLoadObj.length && i<1000; i++){	// "eval" all entries in initObjs that were put there further down the page
	    //alert(onLoadObj[i]);
		eval(onLoadObj[i]);
	}	
	for (var i = 1000; i < onLoadObj.length; i++)
		eval(onLoadObj[i]);
}

//null-functions needed for debugging purpose only
  var dbMode=false;
  function dbWrite(){}
  
	// flips main navigation
	function switchImage(divId,imageName){
	document.getElementById(divId).src = 'imgs/main.nav/'+imageName;
}

//AddHandler for clips

function addClipHandler(){
    var clips = getElementsByAttributeValue("class","clip_container","div");   
     
    var i=0;
    var clipdesc=document.getElementById("desc_container");
    for(;i<clips.length;i++){
        AddRefHandler("onclick",function(){alert("Dieses Video in Player laden!");return false;},clips[i],clips[i]);
        //alert(getAttributeValue(clips[i].parentNode.parentNode,"id"));
        if(getAttributeValue(clips[i].parentNode.parentNode,"id")=="c_left"){
            AddRefHandlerCtx("onmouseover",displayChange,clipdesc,clips[i],"block");
            AddRefHandlerCtx("onmouseout",displayChange,clipdesc,clips[i],"none");
        }
    }
}
//onLoadObj[onLoadObj.length]="addClipHandler()";