function openWindow(url, w, h, scroll) {
	x = window.open(url, "evolve","width="+w+",height="+h+",status=no,toolbar=no,menubar=no,location=no,resizable=yes,directories=no,scrollbars="+scroll);
}

function openWindowName(url, name, w, h, scroll) {
	x = window.open(url, name,"width="+w+",height="+h+",status=no,toolbar=no,menubar=no,location=no,resizable=yes,directories=no,scrollbars="+scroll);
}

function upperMe(field) {
	field.value = field.value.toUpperCase();
}

function gotoURL(url) {
	location = url;
}

/*
 * SUBMENU FUNTIONS
 */

// Hack to add startsWith to a string
String.prototype.startsWith = function(sStart)
{
	return (this.substr(0,sStart.length)==sStart);
}
function closeDiv( divID ) {
	var div = document.getElementById( divID );
	div.style.display = 'none';
	div.style.visibility = 'hidden';
}
function showDiv( divID ) {
	var div = document.getElementById( divID );
	div.style.display = 'block';
	div.style.visibility = 'visible';
	div.focus();
}
function toggleDiv( divID ) {
	var div = document.getElementById( divID );
	if ( div.style.visibility == 'visible' )
		closeDiv( divID );
	else
		showDiv( divID );
}
function showOnCorner( divID, divRef, str ) {
	var div = document.getElementById( divID );
	var ref = document.getElementById( divRef );
	var x = ref.offsetLeft;
	var y = ref.offsetTop + ref.offsetHeight;


	div.style.top = y;
	div.style.left = x;
	closeAllStartingWith( divID, str );
	toggleDiv( divID );
}
function closeAllStartingWith( divID, str ) {
	var divs = document.getElementsByTagName( 'div' );
	for( i=0; i<divs.length; i++ ) {
		if( divs[i].id.startsWith( str ) && divs[i].id != divID ) closeDiv( divs[i].id );
	}
}

function foo() {}
