function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

// Browser check

var ie4 = (document.all && !document.getElementById) ? true:false;
var ns4 = (document.layers) ? true:false;
var dom2 = (document.getElementById) ? true:false;


// Pop up functions
function popwin(loc,winname,w,h,scroll,resize) {
	eval('var newwin = window.open("' + loc + '","' + winname + '","width=' + w + ',height=' + h + ',top=0,left=0,location=no,scrollbars=' + scroll + ',menubar=no,toolbar=no,resizable=' + resize + '")');
}

// Everything below this line is the js for the rotating header.

//Must match below
var imageName  = new Array(	
"top_photos_v1.jpg","top_photos_v2.jpg");

//Must match above
var imageText  = new Array(	
"", "" );
								
//---------------------- DO NOT MODIFY BELOW THIS LINE ---------------------------------------//
var gl_max_tries 	 = 5;
var gl_default_index = 0;

var gl_image_path 	= '/olc/images/AVR/';
var gl_delimeter	= '_%_';
var gl_imageHtml 	= '<img src=_%_  align=top width=591 height=65 border=0 alt=_%_>';
var gl_linkHtml		= '<a href=# onClick=openWindow("_%_")>';


function writeImage()
{
	var tmpBuff;
	var theDate;
	var seconds;
	var attempts = 0;
	var msgCount;
	
	msgCount = getArrayFillLength( imageName ); 

	if( msgCount == 0 )
	{
		document.write( "" );
		return( false );
	}
	
	msgCount--; //modulus is zero based

	for( i=0; i < gl_max_tries; i++ )
	{
		//Loop until radom number is within range
		theDate = new Date();
		index = theDate.getSeconds() % 10;
		if( index <= msgCount )
		{
			theDate = null;
			break;
		}
		theDate = null;
	}
	
	if( i == gl_max_tries )
	{
		index = gl_default_index;
	}
	
	image_parts		= 	gl_imageHtml.split( gl_delimeter );
	tmpImageHtml	=	image_parts[0] + 
						gl_image_path + 
	               	 	imageName[index] + 
						image_parts[1] + 
						imageText[index] + 
						image_parts[2] ;
											
	link_parts 		= 	gl_linkHtml.split( gl_delimeter );
	tmpLinkHtml 	= 	link_parts[0] + 
						gl_image_path + 
						imageName[index] + 
						link_parts[1];

//	alert( tmpImageHtml );
//	alert( tmpLinkHtml );
	
	tmpBuff = tmpLinkHtml + tmpImageHtml + '</a>';
	
//	alert( tmpBuff );
	
	document.write( tmpImageHtml );		
	
 	return true;
}

function getArrayFillLength( this_array )
{
	var count = 0;
	
	for( count=0;  count < this_array.length; count++ )
	{
		if( this_array[count] == "" )
		{
			break;
		}
	}
	return( count );	
}


function openWindow( url )
{
	winpops=window.open( url,"","width=600,height=800,scrollbars=yes,resizable=yes,titlebar=no,toolbar=no" )
	
	return false
}