// JavaScript Document
function getId(id) {
	return document.getElementById(id);
}
function onResizeCon() {
	var size = getDocSize();
	var clip = getId("maindiv");
	var tw = size[0];
	var th = size[1];
	var dw = 0;
	var dh = 0;
	
	if (size[0] < 950) {
		tw = 950;
		dh = 15;
	}
	if (size[1] < 660) {
		th = 660;
		dw = 15;
	}
	clip.style.width = (tw-dw)+'px';
	clip.style.height = (th-dh)+'px';
	if (dh > 0 || dw > 0) {
		document.body.style.overflow  = 'auto';
		document.body.style.overflowX = 'auto';
	} else {
		document.body.style.overflow  = 'hidden';
		document.body.style.overflowX = 'hidden';
	}
}
function getDocSize() {
    if (typeof( window.innerHeight ) == 'number') {
	    _width = window.innerWidth;
		_height = window.innerHeight;	
  	} else if ( document.documentElement && (document.documentElement.clientHeight ) ) {
		_width = document.documentElement.clientWidth;
		_height = document.documentElement.clientHeight;
	} else if ( document.body && ( document.body.clientHeight ) ) {
    	_width = document.body.clientWidth;
		_height = document.body.clientHeight;
  	}
	return new Array(_width, _height);
}
function openPopup(url) {
	window.open(url,'myWin','menubar=0,resizable=1,width=616,height=600');
}
function openPopupMin(url) {
	window.open(url,'myWin','menubar=0,resizable=1,width=616,height=360');
}


