//<!--
//this function returns index for top flash navigation positioning
function SetCookie(cookieName,cookieValue,nDays) {
	var today = new Date();
	var expire = new Date();
	if (nDays==null || nDays==0) nDays=1;
	expire.setTime(today.getTime() + 3600000*24*nDays);
	document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString();
}

//getCookie("soundMuted_cookie");
function getCookie(cookieName){
	var allcookies = document.cookie;
	var pos = allcookies.indexOf(cookieName + "=");
	if (pos == -1) return null; // The cookie does not exist
	pos = allcookies.indexOf("=", pos) + 1; // first character
	var pos2 = allcookies.indexOf(";", pos); // last character
	if (pos2 == -1) pos2 = allcookies.length;
	return unescape(allcookies.substring(pos, pos2)); //return coocie value
}

//this function returns index for top flash navigation positioning
function doMenu(){
	var thePath = window.location.toString().split('/');
	var lastPart = thePath[thePath.length-1];
	var soundMuted = getCookie("soundMuted_cookie");
	if(soundMuted == null) soundMuted = "false";
	var flash_code = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="615" height="131" id="nav" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="nav.swf?path='+ lastPart +'&soundMuted='+ soundMuted +'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffcc" /><embed src="nav.swf?path='+ lastPart +'&soundMuted='+ soundMuted +'" quality="high" bgcolor="#ffffcc" width="615" height="131" name="nav" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	return flash_code;
}

//this function randomly rotates images
function generateRandomHomeImage(image_name){
var myimages=new Array()
myimages[1]="images/home.jpg"
myimages[2]="images/home2.jpg"
myimages[3]="images/home3.jpg"
myimages[4]="images/home4.jpg"
myimages[5]="images/home5.jpg"
myimages[6]="images/home6.jpg"

var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.images[image_name].src=myimages[ry];
}



