// JavaScript Document.
// Copyright By eZerg.
var MenuImage = new Image();
MenuImage.src = "images/menuClose.gif";

var MenuImageA = new Image();
MenuImageA.src = "images/menuCloseA.gif";

var MenuLineA = new Image();
MenuLineA.src = "images/menuLineC.jpg";

if(navigator.appName == "Netscape"){
document.getElementById("link").href="default.css";
document.getElementById("top-left").innerHTML="<a href=\"index.php\"><img src=\"../images/logo.png\" align=\"left\" width=\"214\" height=\"121\"/></a>";
}
function OnOverMenuLink(TdObj, IDNum)
{
	//TdObj.style.textDecoration = 'underline';
	TdObj.style.background = "url(images/menuLineC.jpg) top right repeat-y";
	document.getElementById("mImg" + IDNum).src = MenuImageA.src;
}

function OnOutMenuLink(TdObj, IDNum) {
	//TdObj.style.textDecoration = 'none';
	TdObj.style.backgroundImage = "";
	document.getElementById("mImg" + IDNum).src = MenuImage.src;
}

function OnOverTopLink(TdObj) {
	TdObj.style.textDecoration = 'underline';
}

function OnOutTopLink(TdObj) {
	TdObj.style.textDecoration = 'none';
}

//begin Archive functions
function mshow() { 
	document.getElementById("month").style.display="inline";
}
function marchive(id) {
	var page = "http://www.doridarmon.uz/index.php";
	var year = document.getElementById("year").value;
	var month = document.getElementById("month").value;
//	document.location.href = page+"?newsid="+id+"&y="+year+"&m="+month;
	document.location.href = "?newsid="+id+"&y="+year+"&m="+month;
}


//end Archive functions
function ov(cab)
{
	cab.style.textDecoration="underline";
	cab.style.cursor="pointer";
}
function ou(cab)
{
	cab.style.textDecoration="none";	
	cab.style.cursor="auto";
}
function cl()
{
	document.getElementById("t").style.width = "100%";
	if(navigator.userAgent.indexOf("MSIE") != -1)
	document.getElementById("t").style.height = screen.height;
	else
	{
	var	screenMozilla = window.screen.height;
	document.getElementById("t").style.height = screenMozilla+"px";
	}
	document.getElementById("t").style.background="url(t.gif) repeat top left";
	document.getElementById("t").style.display="block";
	document.getElementById("CAB").style.display="block";
	document.getElementById("sh").style.display="block";
	document.getElementById("CAB").innerHTML='<table cellspacing="0" width="300" id="lk">'+
'<tr><td colspan="2" class="topcab"><span class="namecab">Вход в личный кабинет</span></td></tr>'+
'<form action="modules/auth.php" name="formCAB" method="post" enctype="multipart/form-data"><tr>'+
'<td class="password">Логин:</td><td class="login"><input type="text" name="login" /></td>'+
'</tr><tr>'+
'<td class="password">Пароль:</td>'+
'<td class="login"><input type="password" name="password" /></td>'+
'</tr><tr>'+
'<td colspan="2" class="botcab"><input type="submit" class="button" value="Войти" /><input type="hidden" name="id" value="288" /> <input type="button" class="button" value="Закрыть" onclick="exitcab()" /></td></tr></form></table>';
}

function exitcab()
{
	document.formCAB.login.value = "";
	document.formCAB.password.value = "";
	document.getElementById("t").style.background="none";
	document.getElementById("CAB").style.display="none";
	document.getElementById("CAB").innerHTML="";
	document.getElementById("t").style.display="none";
	document.getElementById("sh").style.display="none";
}