// image rollover
function rollover( imageobj )
{
	var mystring = imageobj.src;
	if( mystring.indexOf( ".gif" ) >= 1)	{ imageobj.src = mystring.replace( /\.gif/gi, '_over.gif' ); }
	else if( mystring.indexOf( ".png" ) >= 1)	{ imageobj.src = mystring.replace( /\.png/gi, '_over.png' ); }
	else					{ imageobj.src = mystring.replace( /\.jpg/gi, '_over.jpg' ); }
}


// image rollout
function rollout( imageobj )
{
	var mystring = imageobj.src;
	if( mystring.indexOf( ".gif" ) >= 1 )		{ imageobj.src = mystring.replace( /\_over\.gif/gi, '.gif' ); }
	else if( mystring.indexOf( ".png" ) >= 1 )	{ imageobj.src = mystring.replace( /\_over\.png/gi, '.png' ); }
	else					{ imageobj.src = mystring.replace( /\_over\.jpg/gi, '.jpg' ); }
}


// fix height of two elements
function fixH(one,two)
{
	if( document.getElementById(one) )
	{
		// get height
		var lh	= document.getElementById(one).offsetHeight;
		var rh	= document.getElementById(two).offsetHeight;
		var nh	= Math.max(lh, rh);
		
		// set height
		document.getElementById(one).style.height	= nh+"px";
		document.getElementById(two).style.height	= nh+"px";
	}
}

function set_height( divid )
{
	$('seperators').style.height = $('seperators').offsetHeight + 'px';
	$('seperators').morph('overflow:hidden; height: ' + $(divid).offsetHeight + 'px;');
}

function increase_height( )
{
	$('seperators').style.height = $('seperators').offsetHeight + 'px';
	newheight	= $('seperators').offsetHeight + 60;
	$('seperators').morph('overflow:hidden; height: ' + newheight + 'px;');
}

function decrease_height( )
{
	$('seperators').style.height = $('seperators').offsetHeight + 'px';
	newheight	= $('seperators').offsetHeight - 60;
	$('seperators').morph('overflow:hidden; height: ' + newheight + 'px;');
}

// default field values
var defvals = new Array();

// clear field
function clear_field( field )
{
	if( !defvals[field.id] || defvals[field.id] == field.value )
	{
		defvals[field.id]	= field.value;
		field.value		= '';
	}
}

// unclear field
function unclear_field( field )
{
	if( field.value == '' )
	{
		field.value	= defvals[field.id];
	}
}