//=====================================
//	CONTENT PANE RESIZING FUNCTIONS
//=====================================

function getObj(name){
	if (document.getElementById){
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	}else if (document.all){
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}
}

function getWinSize(){
	var iWidth = 0, iHeight = 0;
	if (document.documentElement && document.documentElement.clientHeight){
		iWidth = parseInt(window.innerWidth,10);
		iHeight = parseInt(window.innerHeight,10);
	}else if (document.body){
		iWidth = parseInt(document.body.offsetWidth,10);
		iHeight = parseInt(document.body.offsetHeight,10);
	}
	return {width:iWidth, height:iHeight};
}

function resize_id(obj){
	var oContent = new getObj(obj);
	var oWinSize = getWinSize();
	if ((oWinSize.width - parseInt(oContent.obj.offsetTop,10))<1024){
		oContent.style.width = oWinSize.width - 280;
	}else{
		oContent.style.width = 800;
	}
}

window.onresize = function() {
	resize_id('content-wrap');
} 

//=====================================



function popUp(URL,id,width,height,scrollbar) {
	if (scrollbar == 1){
		var scrolling = 1;
	}else{
		var scrolling = 0;
	}
	var top = (screen.height-height)/2;
	var left = (screen.width-width)/2;
	window.open(URL, id, 'toolbar=0,scrollbars='+scrolling+',location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height+',top='+top+',left='+left);
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

