function popitup(url, name, width, height, scrolling)
{
	newwindow=window.open(url,name,'width='+width+',height='+height+',toolbar=0,scrollbars='+scrolling+',location=0,statusbar=1,menubar=0,resizable=0,top=300,left=300');
	if (window.focus) {newwindow.focus()}
	return false;
}

function newwindow(url, name, width, height)
{
	newwindow=window.open(url,name,'width='+width+',height='+height+',toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,top=300,left=300');
	if (window.focus) {newwindow.focus()}
	return false;
}

function exists(v)
{
	return ( typeof(v) != "undefined" );
}

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

function hideFlash()
{
	if ( typeof(document.all['flashMessage']) == 'object' )
		document.getElementById('flashMessage').style.display='none';
}

