
function openMailPopup(menu, page)
{
	mailWindow = window.open('mail.php?menu=' + menu + '&page=' + page,'Mail','width=400,height=310,resizable=no, scrollbars=yes, menubar=no, location=no, status=no');
}

function startclock()
{
	var thetime=new Date();
	
	var nhours=thetime.getHours();
	var nmins=thetime.getMinutes();
	var nsecn=thetime.getSeconds();
	
	/*if (nhours>=12)
	    AorP="P.M.";
	else
	    AorP="A.M.";
	
	if (nhours >= 13)
	   nhours -= 12;*/
	
	if (nhours == 0)
	   nhours = 12;
	
	if (nsecn<10)
	 nsecn = "0" + nsecn;
	
	if (nmins<10)
	 nmins = "0" + nmins;
	
	document.clockform.clockspot.value = nhours+":"+nmins+":"+nsecn;
	
	setTimeout('startclock()',1000);
}

function MM_findObj(n, d) 
{ //v4.01
	var p,i,x;  
	if(!d) d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue)
{ //v6.0
	var obj = MM_findObj(objName);
	if (obj && (theProp.indexOf("style.")==-1 || obj.style)) {
		if (theValue == true || theValue == false)
			eval("obj."+theProp+"="+theValue);
		else 
			eval("obj."+theProp+"='"+theValue+"'");
	}
}

function hideGreetingLayer()
{
	document.felicitare.style.visibility = 'hidden';
	//document.felicitare.style.pixelTop = -500;//"500 px";
	//document.felicitare.style.margin-top = '-500px';
	//MM_changeProp("felicitare", "top", "500");
	MM_changeProp('felicitare','','style.width','0','DIV')
}
