		// Browser Check
		var ns4   = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
		var ns6   = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) == 6) ? 1 : 0;
		var ie4   = (document.all) ? 1 : 0;
		var MinIE5   = (ie4 && navigator.appVersion.indexOf("5.")  >= 0) ? 1 : 0;
		var MinIE55  = (MinIE5 && navigator.appVersion.indexOf("5.5") >= 0) ? 1 : 0;
		var newDom = (ns6 || MinIE55) ? true : false ; 
		var MacNN4 = (ns4 && (navigator.userAgent.indexOf('Mac') != -1) && !win ) ? 1 : 0;
		var MacIE4 = (ie4 && (navigator.userAgent.indexOf('Mac') != -1) && !win ) ? 1 : 0;
		var Mac = (MacNN4  || MacIE4 ) ? 1 : 0;
		
		
		/***************************************
		 
		 Output correct stylesheet for Client's browser
		 Don't delete this, I haven't finished yet !
		 
		 Dominic 01.07.07
		 
		****************************************
		var macStyleNN4  = "<?=$context->encodeResourceURL('css/macNN4.css')?>";
		var macStyleIE4  = "<?=$context->encodeResourceURL('css/macIE4.css')?>";
		var winStyle     = "<?=$context->encodeResourceURL('css/main.css')?>";
		
		if ( MacNN4 ) {
			document.writeln ("<link rel='stylesheet' type='text/css' HREF='"+macStyleNN4+"'>");
		}
		else if ( MacIE4 ){
			document.writeln ("<link rel='stylesheet' type='text/css' HREF='"+winStyle+"'>");
		}
		else {
			document.writeln ("<link rel='stylesheet' type='text/css' HREF='"+winStyle+"'>");
		}
	*/
		
		function show(object) {
			if		(ns4 && document.layers[object]){
		    			document.layers[object].visibility = 'show';
			}
			if		(ie4 && document.all[object]){
		    			document.all[object].style.visibility = 'visible';
			} else if (newDom){
		    			document.getElementById(object).style.visibility = 'visible';
				}
		}   				
    	function hide(object) {																									
			if		(ns4 && document.layers[object]){
		    			document.layers[object].visibility = 'hide';
			}
			if		(ie4 && document.all[object]){
		    			document.all[object].style.visibility = 'hidden';
			} else if	(newDom){
		    			document.getElementById(object).style.visibility = 'hidden';
				}
		}
		/* 
			show and hide respective Hotdeal Headline & Contents 
			used for the Hotdeal Template in Intershop	
		*/
		function showIndex( index ) {
			for ( i = 1; i <= 3; i++ ) {
				if ( i == index) {
					show( "hotdeal"+i+"Content" );
					show( "hotdeal"+i+"Headline" );
				}
				else {
					hide( "hotdeal"+i+"Content" );
					hide( "hotdeal"+i+"Headline");
				}
			}
		}
		var loaded = false;
			
		function preloadIntershopImages(){
			if(document.images) {
				
				return (loaded = true);
				}
		}
		
		function preloadImages() {
		    if (document.images) {
		             	
		        return (loaded = true);
		    }
		}
		
		function newImage(arg) {
			if (document.images) {
					rslt = new Image();
					rslt.src = arg;
			return rslt;
			}
		}
		
		function changeImage() {
			if (document.images) {
				for (var i=0; i<changeImage.arguments.length; i+=2) {
					document.images[changeImage.arguments[i]].src = changeImage.arguments[i+1];
				}
			}
		}
		
		/* Mouseover effect for Intershop*/
		function rollOut(imgName) {
		}
		
		function rollIn(imgName) {
		}
		
		function init(){
			preloadImages();
			preloadIntershopImages();
			
		}	
		
		// Open Window; must set parameter 1 can set 2,3 i.e height and width
		function openPopup (theURL)	{
			var theHeight = 445;
			var theWidth = 513;
			if (openPopup.arguments.length == 3)
			{
				theWidth = openPopup.arguments[1];
				theHeight = openPopup.arguments[2];
			}
			window.open (theURL, 'infowindow','width='+theWidth+',height='+theHeight+',left=200,top=200,location=no,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes');
		}
		function openFormular (theURL) {
			var theHeight = 570;
			var theWidth = 662;
			if (openFormular.arguments.length == 3)
			{
				theWidth = openPopup.arguments[1];
				theHeight = openPopup.arguments[2];
			}
			window.open (theURL, 'infowindow','width='+theWidth+',height='+theHeight+',left=10,top=10,location=no,resizable=no,menubar=no,status=no,toolbar=no,scrollbars=yes');
		}
			
