// VÖLKwerbung JavaScript Document Basic JS in combination with jQuery

//function open window not used jet
function openNewWindow(URLtoOpen, windowName, windowFeatures)
{ newWindow=window.open (URLtoOpen, windowName, windowFeatures);}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		munich_o = newImage("../bilder/scrollDn-o.gif");
		nav1_o = newImage("../bilder/scrollUp.gif");
		menu1_o = newImage("../bilder/ulSquare.gif");
		
		preloadFlag = true;
	}
}


// for flickerfree dropdown, since IE can only :hover on an <a> element; other elements not!
// So for IE we have to use onmouseover/onmouseout events
// start IE check with <body onLoad="init('droplist')">
// if there are more 'droplists', name them differently, else it won't work for those!

var g_bH = false;

  function init(p_strId) {
    g_bH = false;
    var l_E = document.getElementById(p_strId);
    if(l_E && document.defaultView) {
if(document.defaultView.getComputedStyle(l_E, 'hover')) {
  g_bH = true;
}
    }
    l_E = null;
  }

  
  //	Browsercheck (needed)
	function lib_bwcheck() {
		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;
	}
	
//	replace image
	var bw = new lib_bwcheck();
	
	function set_image(name, url) {
		var img = document.images[name];
		if(img){
		  img.src = url;
		}
	}
	
	
$(document).ready(function() {
  
    /* sample function for animation; now in use*/
 $('#mainWrapper').css('display','none');					   
  var mainAnimation = function() {
	  var $mainWrapperHeight = $('#mainWrapper').css('height'); //var not used jet	  
	  //alert($mainWrapperHeight);
	  //$('#mainWrapper').fadeIn('slow'); 
	 // $('#mainWrapper').show(1000); 
	//   $('#mainWrapper').animate({height: 'show'}, 'slow'); 
	   $('#mainWrapper').animate({width: 'show'}, 'slow'); 
		
  };	
  mainAnimation();


 

});





