
	function addLoadEvent(func) {
  		var oldonload = window.onload;
  		if (typeof window.onload != 'function') {
    		window.onload = func;
  		} else {
    		window.onload = function() {
      		oldonload();
      		func();
    	}
  	}
}
	function setDivElementHeight(id, id2) {
		var heightContent = 45;
		if (document.getElementById(id) != null && document.getElementById(id2) != null) {
			if (document.getElementById(id)) {
				heightContent = document.getElementById(id).offsetHeight > heightContent ? document.getElementById(id).offsetHeight : heightContent;
			}
			if (document.getElementById(id2)) {
				heightContent = document.getElementById(id2).offsetHeight > heightContent ? document.getElementById(id2).offsetHeight : heightContent;
			}
			document.getElementById(id).style.height=heightContent + "px";
			document.getElementById(id2).style.height=heightContent + "px";
		}
	}
	
	function getWindowHeight() {
		var windowHeight = 0;
		if (typeof(window.innerHeight) == 'number') {
			windowHeight = window.innerHeight;
		}
		else {
			if (document.documentElement && document.documentElement.clientHeight) {
				windowHeight = document.documentElement.clientHeight;
			}
			else {
				if (document.body && document.body.clientHeight) {
					windowHeight = document.body.clientHeight;
				}
			}
		}
		return windowHeight;
	}
	function setWrapperHeight() {
		if (document.getElementById) {
			var windowHeight=getWindowHeight();
			if (windowHeight>0) {
				var pageWrapper=document.getElementById('pageWrapper');
				pageWrapper.style.height=windowHeight + 'px';
			}
		}
	}

	function fixMacIE(classname) {        
		var divs=document.getElementsByTagName("DIV");   
  		for(var d=0; d < divs.length;d++){     
 			if(divs[d].className.indexOf(classname)==0){    
 				divs[d].innerHTML+= "<div class='mac-clearfix'> </div>"; 
			}  
  		}      
	}
	function init(){
		if( navigator.appVersion.indexOf('Mac')!=-1 && document.all){     
		/* Pass the class name on the container to fix mac ie  */    
 		fixMacIE("clearfix");
		}
	}

