/* SHOW/HIDE */
menu_status = new Array();

function determineShowHideStateDD(countryName, ddId, fieldId) {
	if (countryName != 'Australia') {
		hide(ddId);
		show(fieldId);
	} else {
		hide(fieldId);
		show(ddId);
	}
}

function showHide(theid){
    if (document.getElementById) {
    	var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}

function hide(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function show(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

function unlock(id) {
	document.getElementById(id).disabled = false;
}
function lock(id) {
	document.getElementById(id).disabled = true;
}


/* POP UP */
/* get current date object */
day = new Date();
/* get time for browser */
id = day.getTime();
function popUp(URL,x,y) {
/* popup function */
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + x + ",height=" + y + "');");

}

