/**
 * @author thenze
 */
    	
$(document).ready(function(){
/*
	if ($.browser.safari == false) {
    	equalHeight($(".contencolumn"));
 	}
  	*/
	resize();
	
});


// make all columns in content area the same height. ;)
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

function resize(){  
	var frame = document.getElementById("wrap");  
	var htmlheight = document.body.parentNode.scrollheight;  
	var windowheight = window.innerheight;  
	if ( htmlheight < windowheight ) { document.body.style.height = windowheight + "px"; frame.style.height = windowheight + "px"; }  
	else { document.body.style.height = htmlheight + "px"; frame.style.height = htmlheight + "px"; }  
} 


// IE PNG enable
 if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent) &&
  document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule)
 {
  document.styleSheets[0].addRule('*', 'behavior: url(/assets/templates/vialine/js/iepngfix.htc)');
 }
 
 // Here's another script that disables all PNGs in IE when the page is printed.
 
 if (window.attachEvent && /MSIE (5\.5|6)/.test(navigator.userAgent))
 {
  function printPNGFix(disable)
  {
   for (var  i = 0; i < document.all.length; i++)
   {
    var e = document.all[i];
    if (e.filters['DXImageTransform.Microsoft.AlphaImageLoader'] || e._png_print)
    {
     if (disable)
     {
      e._png_print = e.style.filter;
      e.style.filter = '';
     }
     else
     {
      e.style.filter = e._png_print;
      e._png_print = '';
     }
    }
   }
  };
  window.attachEvent('onbeforeprint',  function() { printPNGFix(1) });
  window.attachEvent('onafterprint',  function() { printPNGFix(0) });
 }
 

