var WW_initArray 	= new Array();

var WW_superInitArray 	= new Array();



function WW_init(){

	for (var i=0; i<WW_superInitArray.length; i++)

    eval(WW_superInitArray[i]);

  for (i=0; i<WW_initArray.length; i++)

    eval(WW_initArray[i]);

	

	return true;

}



function WW_addInitFunction(func){

	WW_initArray[WW_initArray.length]=func;

	return true;

}



function WW_addSuperInitFunction(func){

	WW_superInitArray[WW_superInitArray.length]=func;

	return true;

}



function WW_offsetX(obj){

  if (obj==document.body) return 0;

  var result=obj.offsetLeft+WW_offsetX(obj.offsetParent);

	return result;

}



function WW_offsetY(obj){

  if (obj==document.body) return 0;

  var result=obj.offsetTop+WW_offsetY(obj.offsetParent);

	return result;

}



function WW_openDebugWin(){

	WW_debugWindow = window.open("","DEBUG","scrollbars=yes, width=200, height=200, outerWidth=200, outerHeight=200");

	WW_debugWindow.document.open("text/plain");

}



function WW_closeDebugWin(){

	if (typeof(WW_debugWindow)!="undefined")

		WW_debugWindow.close();

}





function WW_clearDebugWin(text){

	WW_debugWindow.document.close();

	WW_debugWindow.document.open();

}





function WW_debug(text){

	if (typeof(WW_debugWindow)=="undefined" || WW_debugWindow.closed)

		WW_openDebugWin();

	WW_debugWindow.document.writeln(text);

	return true;

}



function WW_dump(obj){

	str="\n***"+typeof(obj)+"***\n";

	for (var o in obj)

		str+=o+" : "+obj[o]+"\n";

	return str;

}



function WW_setStatus(statustext){

	if (!document.all && document.getElementById) {
		//nichts
	} else {
		window.status=statustext;
		return true;
	}

}



function WW_clearStatus(){
	if (!document.all && document.getElementById) {
		//nichts
	} else {
	window.status="";
	return true;
	}
}



function WW_preload(imgArray, name, suffix, number){

	for (var i=0; i<number; i++){

		imgArray[i] 	= new Image();

		if (typeof(name)=="string")

			imgArray[i].src	= name+((i<10)?"0":"")+i+suffix;

		else

			imgArray[i].src	= name[i]+suffix;

	}

 	return true;

}



function WW_getQuery(item){

	for (var i=0; i<WW_queryArray.length; i++)

		if (WW_queryArray[i][0]==item)

			return WW_queryArray[i][1];

	return false;

}



WW_queryArray = new Array();

if (window.location.search!=""){

	WW_dummy = window.location.search.substring(1);

   	WW_dummy = WW_dummy.split("&");

   	for  (var i=0; i<WW_dummy.length; i++)

      		WW_queryArray[i] = WW_dummy[i].split("=")

}





function WW_windowWidth(){

   return NN ? window.innerWidth : document.body.offsetWidth;

 

}



function WW_windowHeight(){

   return NN ? window.innerHeight : document.body.offsetHeight;

 

}

