//ADJUST SCROLL HEIGHT
function adjustHeight(){
	var myWidth = 0, myHeight = 0;
	
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}

	var divHeight1 = document.getElementById("wrapper").clientHeight
	var divHeight2 = document.getElementById("footerContact_Address").clientHeight
	var divHeight = parseInt(divHeight1 + divHeight2)
	
	//default height
	document.getElementById("footerArt").style.height = '50px';

	if(myHeight > divHeight){
		if( typeof( window.innerWidth ) == 'number' ) {
			document.getElementById("footerArt").style.height = parseInt(myHeight) - parseInt(divHeight) + 48 +'px'
		}else{
			document.getElementById("footerArt").style.height = parseInt(myHeight) - parseInt(divHeight) + 49 +'px'
		}
	}
}



// POP UP
function overlay() {
	$('overlay').style.height = getDocHeight()+'px'
	$('overlay').show()
}

function showDialog(divName) {
	//Scroll offeset
	var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body
	var dsocleft=document.all? iebody.scrollLeft : pageXOffset
	var dsoctop=document.all? iebody.scrollTop : pageYOffset

	dWidth = $(divName).getWidth()
	//dHeight = $(divName).getHeight()	
	dHeight = parseInt(dsoctop + 150)

	pWidth = $(document.body).getWidth()
	pHeight = getDocHeight()

	$(divName).style.top = dHeight+'px' //parseInt(pHeight/2 - dHeight/2)+'px'
	$(divName).style.left = parseInt(pWidth/2 - dWidth/2)+'px'

	overlay()
	new Effect.Appear(divName,{duration:.25})
}

function closepopup(id) {
	new Effect.Fade('overlay',{duration:.25})
	
	if(id==1){
		new Effect.Fade('overview',{duration:.25})
	}else{
		new Effect.Fade('legal',{duration:.25})
	}
}

function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}



/*
//POP UP CONTENT
popup_overview = ''

popup_overview+='<div id="overview" style="display:none; background-color:#FFFFFF; width:493px;  border: solid 1px #999999; z-index:100;position:absolute;">'
popup_overview+='<div style="background-color:#FFFFFF; width:460px;padding:6px; border: solid 1px #999999; margin:10px">'
popup_overview+='<div style=" background-image:url(images/popup_bgImage.jpg); background-position:top center; background-repeat:no-repeat">'
popup_overview+='<div style="width:28px; height:28px; float:right; margin-top:9px;margin-right:8px; cursor:pointer;" onclick="closepopup(1)"><img src="images/spacer.gif" widht="28" height="28" /></div>'
popup_overview+='<div style="height:83px"></div>'
popup_overview+='<div style="margin-left:12px; width:423px; height:340px; overflow:auto">'

popup_overview+='<span class="contentHeader">OVERVIEW</span><br /><br />'
popup_overview+='<span style="color:#707070; font-size:11px">'
popup_overview+='ONCAP, in partnership with operating company management teams,  invests  in and builds shareholder value in North American small and '
popup_overview+='mid-size companies that are leaders in their defined market niche and possess meaningful growth potential.<br /><br />'
popup_overview+='ONCAP transactions encompass a wide variety of situations including minority and control ownership positions in privately owned '
popup_overview+='businesses, non-core divisions of larger organizations and publicly traded companies.  ONCAP will also provide equity capital to businesses to '
popup_overview+='facilitate the execution of strategic acquisition and organic growth initiatives. In partnership with management, we design flexible and '
popup_overview+='creative transaction structures that best position a business for long-term and '
popup_overview+='sustainable growth.<br /><br />'
popup_overview+='ONCAP is the mid-market private equity business of Onex Corporation, one of North America’s oldest and most successful private equity '
popup_overview+='firms.  Over 25 years, Onex has completed more than 220 acquisitions and generated a 29 per cent compound annual return on invested capital. '
popup_overview+='Today, Onex manages US $11 billion in assets through private equity, real estate and credit security platforms.  Onex shares trade on the '
popup_overview+='Toronto Stock Exchange under the stock symbol OCX. <br /><br />'
popup_overview+='For more information on Onex, please visit <a href="http://www.onex.com" target="_blank" style="color:#1779b6">www.onex.com</a>.  '
popup_overview+='</span>'

popup_overview+='</div>'
popup_overview+='<div style="height:13px"></div>'
popup_overview+='</div>'
popup_overview+='</div>'
popup_overview+='</div>'


*/



popup_legal = ''
popup_legal+='<div id="legal" style="display:none; background-color:#FFFFFF; width:493px;  border: solid 1px #999999; z-index:100;position:absolute;">'
popup_legal+='<div style="background-color:#FFFFFF; width:460px;padding:6px; border: solid 1px #999999; margin:10px">'
popup_legal+='<div style=" background-image:url(images/popup_bgImage.jpg); background-position:top center; background-repeat:no-repeat">'
popup_legal+='<div style="width:28px; height:28px; float:right; margin-top:9px;margin-right:8px; cursor:pointer;" onclick="closepopup(2)"><img src="images/spacer.gif" widht="28" height="28" /></div>'
popup_legal+='<div style="height:83px"></div>'
popup_legal+='<div style="margin-left:12px; width:423px; height:310px; overflow:auto">'

popup_legal+='<span class="contentHeader">LEGAL</span><br /><br />'
popup_legal+='<span style="color:#707070; font-size:11px">'
popup_legal+='This site is for informational purposes only.  No information on this site should be construed as a solicitation,' 
popup_legal+='offer, recommendation, representation of suitability or '
popup_legal+='endorsement of any security or investment.<br /><br />'
popup_legal+='ONCAP makes no representations or warranties as to the accuracy, reliability or completeness of any information or '
popup_legal+='document on this site obtained outside of ONCAP.<br /><br />'
popup_legal+='All content included on this site, such as graphics, logos, articles and other materials, is the property of ONCAP '
popup_legal+='or others and is protected by copyright and other laws.<br /><br />'
popup_legal+='ONCAP is not responsible for any damages or injury, including but not limited to special or consequential damages, '
popup_legal+='that result from your use of (or inability to use) this '
popup_legal+='site, including any damages or injury caused by any failure of performance, error, omission, interruption, defect, '
popup_legal+='delay in operation, computer virus, line failure, or '
popup_legal+='other computer malfunction. You acknowledge that ONCAP provides the contents of this website on an "as is" basis with no '
popup_legal+='warranties of any kind. Your use of this website '
popup_legal+='and use or reliance upon any of the materials on it is solely at your own risk.'
popup_legal+='</span>'

popup_legal+='</div>'
popup_legal+='<div style="height:13px"></div>'
popup_legal+='</div>'
popup_legal+='</div>'
popup_legal+='</div>'