/* Begin - Toggle Panel Visibility
------------------------------------------------
Description: Toggle the visibility of a DIV block
Author:      Law Tien Soon
URL:         http://tiensoon.blogspot.com
Created:     06 Feb 2005
------------------------------------------------ */

// Check if the browser is IE4
var ie4 = false;
if(document.all) {
    ie4 = true;
}

// Return DIV object based on the ID given
function getObject(id) {
    if (ie4) {
        return document.all[id];
    }
    else {
        return document.getElementById(id);
    }
}

// Toggle the visibility of a specific DIV
function togglePanelVisibility(divId, stateId) {
    var divObj = getObject(divId);

    if(divObj.style.display == 'none') {
        divObj.style.display = 'block';
        if(stateId != null) {
            var stateObj = getObject(stateId);
            stateObj.innerHTML = "-";
        }
    }
    else if(divObj.style.display == 'block') {
        divObj.style.display = 'none';
        if(stateId != null) {
            var stateObj = getObject(stateId);
            stateObj.innerHTML = "+";
        }
    }
}

/* End - Toggle Panel Visibility
------------------------------------------------ */

function openWindow(url, name, width, height) {
	var defaultBaseFeatures = "resizable=1,scrollbars=yes,statusbar=yes";
	var features = defaultBaseFeatures + ",width=" + width + ",height=" + height;

	mywindow = window.open(url, name, features);
  	mywindow.moveTo(0,0);
}