/* check browser */
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

/* preload SWF for IE7 */
function load_swf($ID, $filename, $width, $height){
	document.getElementById($ID).innerHTML = '<object type="application/x-shockwave-flash" data="' + $filename + '" width="' + $width + '" height="' + $height + '"><param name="menu" value="false" /><param name="movie"	value="' + $filename + '" /><param name="wmode" value="transparent" /></object>';
}
function show_object($object) {
	$object.style.visibility = "visible";
}
function hide_object($object) {
	$object.style.display = "none";
}
function checkImg($object) {

	$object = $object.firstChild;
	$current = $object.src; // get clicked element
	
	/* unselect all buttons */
	
	$LIs = document.getElementById('cross-links-ul').childNodes;
	for (i = 0; i < $LIs.length; i++) // go through all <li>
	{
		if($LIs[i].nodeType == 1) 
		{ 
			$node = $LIs[i];			
			$menu_object = $node.firstChild.firstChild; // got IMG
			$source = $menu_object.src;
			$unselected_source = $source.substr(0, $source.length-4) + '.gif';
			$menu_object.src = $unselected_source;
			$menu_object.className = '';
		}				
	}
	
	$selected_source = $current.substr(0, $current.length-4) + '.jpg'; // selected image source	
	$object.src = $selected_source;	
	$object.className = "selected";
}

