var agt=navigator.userAgent.toLowerCase();
var is_ie6 = (agt.indexOf("msie 6.")!=-1);
	
function scaleFont(factor){	
 	var currentFontSize = jQuery('html').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*factor;
    jQuery('html').css('font-size', newFontSize);
}


function doScale(factor) {	
	
	jQuery("div,img,li").each(function(){				
			var size=(jQuery(this).css('height'));
			size=Math.round(parseFloat(size)*factor);
			if (!isNaN(size)) {
				jQuery(this).css('height',size+"px");
			}
			
			size=(jQuery(this).css('width'));
			size=Math.round(parseFloat(size)*factor);
			if (!isNaN(size)) {
				jQuery(this).css('width',size+"px");
			}
	});
	
	jQuery(".page").css("margin","0 auto");
}

function getBodySize() {
	var bs =parseFloat(jQuery("body").css("font-size"));
	return bs;
	
}

var scaleCounter=0;




function plus() {
	if (scaleCounter<0) {		
		scaleFont(1.05);	
		scaleCounter++;		
	}
	
	else if (scaleCounter<3) {
		doScale(1.15);
		scaleFont(1.05);	
		scaleCounter++;
	/*	
		jQuery(".header").css("background","none");
		jQuery(".module_home_product_navigation").css("background","none");
		jQuery(".module_home_product_navigation").css("border","1px solid lightgrey");
		
		jQuery(".module_banner_1").css("background","none");
		jQuery(".module_banner_1").css("border","1px solid lightgrey");
		jQuery(".module_banner_1").css("background-color","lightgrey");
		
		jQuery(".module_banner_2").css("background","none");
		jQuery(".module_banner_2").css("border","1px solid lightgrey");
		/*
		jQuery(".module_banner_3").css("background","none");
		jQuery(".module_banner_3").css("border","1px solid lightgrey");
		*/
	}
		
}

function minus() {
	/*CookieSetz(-1);*/
		
	if (scaleCounter>0){	
		doScale(0.9524);
		scaleFont(0.9524);	
		scaleCounter--;
	}
	else if (scaleCounter>-2){
		scaleFont(0.9524);
		scaleCounter--;	
	}			
	
}
function cleanfield(obj) {
	document.getElementsByName(obj.name)[0].value = '';
}

function CookieSetz(c,attribut,wert)
   {
      document.cookie = c+"="+attribut+"->"+wert;
   }
   
   jQuery(document).ready(function() {		   
     if(typeof document.body.style.maxHeight === "undefined")
        jQuery("#mainNav li").each(function() { 
            that = jQuery(this);
            jQuery(that).bind("mouseenter", function() {
                jQuery(this).addClass("sfhover");
            });
            jQuery(that).bind("mouseleave", function() {
                jQuery(this).removeClass("sfhover");
            });
        });    

 });