function createWindow(location,name,properties) {
	window.open(location,name,properties);
}

function createWindowBare(location,name,properties) {
	createWindow(location,name,'status=yes,toolbar=no,location=no,menubar=yes,scrollbars=yes,directories=no,resizeable=yes,'+properties);
}

function createWindowBareSize(location,name,properties,width,height) {
	if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 640, yMax=480;

    var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2;
	
	createWindowBare(location,name,properties + ',width=' + width + ',height=' + height + ',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
}

function resizeWindow(window,width,height) {

	if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 640, yMax=480;

    var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2;
	window.moveTo(xOffset,yOffset);
	window.resizeTo(width, height);					
}

function resizeWindowNewURL(window,url,width,height) {
	window.location.href = url;
	if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 640, yMax=480;

    var xOffset = (xMax - width)/2, yOffset = (yMax - height)/2;
	window.moveTo(xOffset,yOffset);
	window.resizeTo(width, height);					
}

/* object must be a div tag */
function openClose(object,cb) {
	if(!cb.checked) {		
		object.style.visibility='hidden';
		object.style.height='1px';
	} else {
		object.style.visibility='';
		object.style.height='';
	}
}

/* object must be a div tag */
function greyOut(object,cb) {
	if(!cb.checked) {		
		object.disabled=true;
		object.style.background_color='gray';
	} else {
		object.disabled=false;
		object.readonly=false;
		object.style.background_color='white';		
	}
}