var agt	= navigator.userAgent.toLowerCase();
var versInt = parseInt(navigator.appVersion);
function CNN_goTo( url ) {
	window.location.href = url;
}
/*
function CNN_roofBar( tableCellRef, hoverFlag ) {
	if ( hoverFlag ) {
		tableCellRef.style.backgroundImage = 'url("http://i.cnn.net/cnn/.element/img/1.0/main/roofbar_bg2.gif")';
		if ( document.getElementsByTagName ) {
			tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#c00';
		}
	} else {
		tableCellRef.style.backgroundImage = 'url("http://i.cnn.net/cnn/.element/img/1.0/main/roofbar_bg.gif")';
		if ( document.getElementsByTagName ) {
			tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#333';
		}
	}
}
function CNN_roofBarClick( tableCellRef, url ) {
	CNN_roofBar( tableCellRef, 0 );
	CNN_goTo( url );
}*/
function CNN_navBar( tableCellRef, hoverFlag, navStyle ) {
	if ( hoverFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#69c';
				break;
			default:
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#c00';
				}
		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#023576';
				break;
			default:
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#000';
				}
		}
	}
}
function CNN_navBarClick( tableCellRef, navStyle, url ) {
	CNN_navBar( tableCellRef, 0, navStyle );
	CNN_goTo( url );
}
// this function is used to redirect the search form if necessary

function napVector (vectorChoice) {
	   location.href = document.nap.vector.options[document.nap.vector.selectedIndex].value;
	   }
function ipVector (vectorChoice) {
	   location.href = document.ip.vector.options[document.ip.vector.selectedIndex].value;
	   }
function CNN_setOptionsFromArray( selectOptions, array ) {
//	selectOptions = options reference -	document.forms['{formname}'].{selectname}.options
//								   or -	document.{formname}.{selectname}.options
//	array = Array - { 'text', 'value', 'text', 'value', ... }
	var length = selectOptions.length;
	var i = 0;
	if ( new Option() ) {
		length = 2;								//	start at the top
		for ( i = 0; i < array.length; i+=2 ) {
			selectOptions[length++] = new Option( array[i], array[i+1], false );
		}
	} else if ( document.createElement( "OPTION" ) ) {
		if ( selectOptions.length > 1 ) {
			for ( i = 2; i < selectOptions.length; i++ ) {
				selectOptions.remove( 2 );		//	strip off options because we add them later
			}
		}
		for ( i = 0; i < array.length; i+=2 ) {
			var newOption = document.createElement( "OPTION" );
			newOption.text = array[i];
			newOption.value = array[i+1];
			selectOptions.add( newOption );
		}
	}
}

// end