function nocontextmenu()  
{
	event.cancelBubble = true
	event.returnValue = false;
	return false;
}
 
function norightclick(e) 
{
	if (window.Event) 
 	{
  		if (e.which == 2 || e.which == 3)
   		return false;
 	}
 	else
  	if (event.button == 2 || event.button == 3)
  	{
   		event.cancelBubble = true
   		event.returnValue = false;
   		alert("Copyright Hahui & Associates 2004-2005\n             office@hahui.ro");
   		return false;
  	}
}

function leadingZero(nr)
{
	if(nr < 10)
    	{
    		return("0"+nr);
  	}
  	else
  	{
    		return(nr);
  	}
}

function getDateTime()
{
	var currDate = new Date();
  	var luna = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
  	var zas = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  	dateDisplay = "<a href=ro target=_parent style='font-family: verdana; font-size:8pt; color: white; text-decoration: none;'>Romana</a>" + " | " + zas[currDate.getDay()]+
    		", "+leadingZero(currDate.getDate())+
    		" "+luna[currDate.getMonth()]+
    		" "+currDate.getFullYear()+
    		" | "+leadingZero(currDate.getHours())+":"+
    		leadingZero(currDate.getMinutes())+":"+
    		leadingZero(currDate.getSeconds())+"&nbsp;&nbsp;";
 	return dateDisplay;
}

function putDate()
{
	displayDate = getDateTime();
	document.getElementById('dateDisplayDiv').innerHTML=displayDate;
	setTimeout("putDate()",1000);
}

function getFlashName()
{
if (navigator.appName.indexOf("Microsoft Internet")!=-1)
   {
     return parent.frames[1].menu;
   }
   else
   {
     return window.document.frames[1].menu; 
   }     
}
function sendData(nr)
{
	var flashMovie=getFlashName();
	flashMovie.SetVariable("/:butonApasat", nr);
	flashMovie.GotoFrame(2);
}
function showHighlight(name)
{
	var rowObj=name.parentElement;
	rowObj.childNodes[0].className = 'tdHighlight';
	rowObj.childNodes[1].className = 'tdHighlight';
	rowObj.childNodes[2].className = 'tdHighlight';
	rowObj.childNodes[3].className = 'tdHighlight';
}
function clearHighlight(name)
{
	var rowObj=name.parentElement;
	rowObj.childNodes[0].className = 'tdNormal';
	rowObj.childNodes[1].className = 'tdNormal';
	rowObj.childNodes[2].className = 'tdNormal';
	rowObj.childNodes[3].className = 'tdNormal';
}
function isEmailAddr(email)
{
  var result = false;
  var theStr = new String(email);
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}
function checkSubmit()
{
	if(document.submit.nume.value=="")
	{
		alert("Input your Sure name please !");
		return false;
	}
	if(document.submit.prenume.value=="")
	{
		alert("Input your First name please !");
		return false;
	}
	if(document.submit.email.value=="")
	{
		alert("Input your E-mail address please !");
		return false;
	}
	if(!isEmailAddr(document.submit.email.value))
	{
		alert("The E-mail address is incorect !");
		return false;
	}
	if(document.submit.email.value.length < 3)
	{
		alert("The E-mail address is incomplete !");
		return(false);
	}
	if(document.submit.mobil.value=="")
	{
		alert("Input your Mobile number please !");
		return false;
	}
	if(document.submit.short.value=="")
	{
		alert("Input the short description of your case please !");
		return false;
	}
	document.submit.submit();
}
function checkMessage()
{
	if(document.contact.nume.value=="")
	{
		alert("Input your Name please !");
		return false;
	}
	if(document.contact.email.value=="")
	{
		alert("Input your E-mail address please !");
		return false;
	}
	if(!isEmailAddr(document.contact.email.value))
	{
		alert("The E-mail address is incorect !");
		return false;
	}
	if(document.contact.email.value.length < 3)
	{
		alert("The E-mail address is incomplete !");
		return(false);
	}
	if(document.contact.mesaj.value=="")
	{
		alert("You have to write a message !");
		return false;
	}
	document.contact.submit();
}
