
//MENU BUTTONS 1.7

	var MaxFlash = 7;
	var sButton;
	var FlashCount = MaxFlash;
	var DestURL;
	var ButtonType = 0;
	var iBtn = 0;

	function ChangeButtonState(NewClass, sB) {
		sButton = sB;
		if(FlashCount==MaxFlash)
			sButton.className = NewClass;
	}
	
	function MenuRedir(NewURL) {
		FlashCount = MaxFlash;
		DestURL = NewURL;
		FlashSelection();
	}

	function FlashSelection() {
		if(sButton.className=="BtnDown") {
			//PlaySound();
			sButton.className="BtnUp";
		} else
			if(sButton.className=="BtnUp")
				sButton.className="BtnDown";
			else
				if(sButton.className=="ImgBtnDown")
					sButton.className="ImgBtnUp";
				else
					if(sButton.className=="ImgBtnUp")
						sButton.className="ImgBtnDown";

		if(FlashCount>0) {
			window.setTimeout("FlashSelection()", 75);
			FlashCount--;
		} else {
			var curClass = sButton.className;
			if(curClass.substr(0,3)=="Img")
				sButton.className = "ImgBtnOff";
			else
				sButton.className = "BtnOff";
			location.href = DestURL;
		}
	}

	function CreateMenuItem(Name, URL, IsImg, IsSep, w, h) {
		var sectionTitle = GetSection();
		if(sectionTitle=="Software Division")
			sectionTitle = "Home";
		else
			if(sectionTitle=="Product Description")
				sectionTitle = "Description";
				
		if(IsImg==1)
			if(releaseforNS)
				document.write("<a href=\"" + URL + "\"><img border=0 src=\"" + Name + "\" width=" + w + " height=" + h + "></a>");
			else {
				document.write("<img name=miImg" + iBtn + " class=ImgBtnOff onmouseover=\"window.status='Click to go to the product`s home page';ChangeButtonState('ImgBtnUp', this);\" onmouseout=\"window.status='';ChangeButtonState('ImgBtnOff', this);\" onmousedown=\"ChangeButtonState('ImgBtnDown', this);\" onmouseup=\"ChangeButtonState('ImgBtnUp', this);\" onclick=\"MenuRedir('" + URL + "');\" border=0 src=\"" + Name + "\" width=" + w + " height=" + h + ">");
				document.all["miImg" + iBtn].style.height = h;
				iBtn++;
			}
		else
			if (releaseforNS)
				document.write("<td width=\"100%\"><a href=\"" + URL + "\">" + Name + "</a></td>");
			else
				if(sectionTitle==Name)
					document.write("<td width=100% class=BtnDis>" + Name + "</td>");
				else
					if(IsSep)
						document.write("<td width=100% class=BtnOffSep onmouseover=\"window.status='Go to: " + Name + "';ChangeButtonState('BtnUp',this);\" onmouseout=\"window.status='';ChangeButtonState('BtnOffSep',this);\" onmouseup=\"ChangeButtonState('BtnUp',this);\" onmousedown=\"ChangeButtonState('BtnDown',this);\" onclick=\"MenuRedir('" + URL + "');\">" + Name + "</td>");
					else
						document.write("<td width=100% class=BtnOff onmouseover=\"window.status='Go to: " + Name + "';ChangeButtonState('BtnUp',this);\" onmouseout=\"window.status='';ChangeButtonState('BtnOff',this);\" onmouseup=\"ChangeButtonState('BtnUp',this);\" onmousedown=\"ChangeButtonState('BtnDown',this);\" onclick=\"MenuRedir('" + URL + "');\">" + Name + "</td>");
	}

	function GetSection() {
		var docTitle = document.title;
		var chunks = new Array;
		chunks = docTitle.split(":");
		var st = chunks[chunks.length-1];
		return(st.slice(1));
	}
	
//FOR WIN-IE5 ONLY

	function MakeSound() {
		if(IE) {
			var src = event.srcElement;
			if(src.tagName=="IMG")
				src = event.srcElement.parentElement;
			if(src.tagName == "A") {
				PlaySound();
				window.setTimeout("FollowURL('" + src.href + "')", 1000);
				return false;
			}
		}
	}

	function PlaySound() {
		if(IE)
			document.embeds["ClickSound"].play();
		
	}

	function FollowURL(url) {
		location.href = url;
	}

	//document.onclick = MakeSound;
