
var oCur = null;
var oCurPart = null;

window.onload = function() {
	var oMenu = document.getElementById("menuMot");
	if (!oMenu) return;
	var aA = oMenu.getElementsByTagName("A");
	for (var i=0; i<aA.length; i++) {
		aA[i].onclick = function() {
			if (!oCur) return;
			//	diminish previous section
			oCur.className = "";
			//	highlight current section
			oCur = this;
			oCur.className = "current";

			var oPart = document.getElementById( oCur.id.substring(1) );
			if (oPart) {
				//	hide previous block
				if (oCurPart)
					oCurPart.style.display = "none";
				//	shows current block
				oPart.style.display = "block";
				oCurPart = oPart;
			}
			this.blur();
			window.scrollTo(0,0);
			return false;
		};

		var oPart = document.getElementById( aA[i].id.substring(1) );
		if ( oPart )
			oPart.style.display = "none";
	}
	//	initial setup
	if ( !oCur ) {
		oCur = aA[0];
		oCur.className = "current";
		oCurPart = document.getElementById( oCur.id.substring(1) );
		oCurPart.style.display = "block";
	}
};

function openVideoWnd(videoSrc, nW, nH) {
	var nWW = 300;
	var nWH = 200;
	if (videoSrc.toLowerCase().indexOf(".mov") != -1 || videoSrc.toLowerCase().indexOf(".qt") != -1) {
		nWW = nW + 10;
		nWH = nH + 15;
		nH += 10;
	} else if (videoSrc.toLowerCase().indexOf(".ra") != -1 || videoSrc.toLowerCase().indexOf(".ram") != -1 || videoSrc.toLowerCase().indexOf(".rv") != -1) {
		nWW = nW + 10;
		nWH = nH + 10;
	} else {
		nWW = nW + 10;
		nWH = nH + 44;
	}
	ygVideoWnd = window.open("videownd.php?f=" + videoSrc + "&w=" + nW + "&h=" + nH, "yg_videoWnd", "resizable=1,scrollbars=0,toolbar=0,status=0,menubar=0,location=0,directories=0,width=" + nWW + ",height=" + nWH);
	ygVideoWnd.focus();
}

