//This script to find the browser resolution height and to set that height to the main wrapper

function myHeight()
{
 var viewportwidth;
 var viewportheight;
 
 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
 if (typeof window.innerWidth != 'undefined')
 {
      viewportwidth = window.innerWidth,
      viewportheight = window.innerHeight
 }
 
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientWidth !=
     'undefined' && document.documentElement.clientWidth != 0)
 {
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
 }
 
 // older versions of IE
 
 else
 {
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 }
//document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
//
mainHeight=viewportheight-80;
extraMarg=viewportheight-674;
TBMarg=extraMarg/2;
//contDivHeight=viewportheight-295;
//updn=contDivHeight-26;
//alert(extraMarg);
/*b=viewportheight-265;
c=viewportheight-285;*/
document.getElementById('mainWrapper').style.minHeight=mainHeight+"px";
//if(document.getElementById('contentDiv'))document.getElementById('contentDiv').style.height=contDivHeight+"px";
if(document.getElementById('topNav'))document.getElementById('topNav').style.marginBottom=TBMarg+"px";
if(document.getElementById('btmNav'))document.getElementById('btmNav').style.marginTop=TBMarg+"px";
//if(document.getElementById('upDown-btn-wrapper'))document.getElementById('upDown-btn-wrapper').style.marginTop=updn+"px";


/*if(document.getElementById('midContainer'))document.getElementById('midContainer').style.minHeight=a+"px";
if(document.getElementById('rightPannel'))document.getElementById('rightPannel').style.minHeight=b+"px";
if(document.getElementById('rightPannel-inner'))document.getElementById('rightPannel-inner').style.minHeight=c+"px";
*/
}

function mCustomScrollbars(ele){
	/* 
	malihu custom scrollbar function parameters: 
	1) scroll type (values: "vertical" or "horizontal")
	2) scroll easing amount (0 for no easing) 
	3) scroll easing type 
	4) extra bottom scrolling space for vertical scroll type only (minimum value: 1)
	5) scrollbar height/width adjustment (values: "auto" or "fixed")
	6) mouse-wheel support (values: "yes" or "no")
	7) scrolling via buttons support (values: "yes" or "no")
	8) buttons scrolling speed (values: 1-20, 1 being the slowest)
	*/
	ele.mCustomScrollbar("vertical",300,"easeOutCirc",1.05,"auto","yes","yes",15); 
} 

