// JavaScript Document

/*
function changeStyle(id, cid){
		
	if (cid == 1 && id == 7){                                                   		
			document.getElementById('menu_'+id).className = 'menu_activ';
		}
		else {
			document.getElementById('menu_'+id).className = '';
		}
		
}

*/

function changeStyle(id, cid){
	if (cid == 1) {
		document.getElementById('menu_'+id+'_bef').className = 'menu_activ_border';
		document.getElementById('menu_'+id).className = 'menu_activ';		
	}
		else {
			document.getElementById('menu_'+id+'_bef').className = '';
			document.getElementById('menu_'+id).className = '';
		}
}

function echeck(str) {
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)

	 if (str.indexOf(at)==-1) return false
	 if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr) return false
 	 if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || ldot+1==lstr) return false
	 if (str.indexOf(at,(lat+1))!=-1) return false
	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot) return false
	 if (str.indexOf(dot,(lat+2))==-1) return false		
	 if (str.indexOf(" ")!=-1) return false
	
	return true					
}


function checkForm(){
	var t=0;
	document.getElementById('inpNume').className = '';
	document.getElementById('inpPNume').className = '';
	document.getElementById('inpEmail').className = '';
	if (document.contact.nume.value == "") document.getElementById('inpNume').className = 'error';
		else t++;
	if (document.contact.prenume.value == "") document.getElementById('inpPNume').className = 'error';
		else t++;	
	if (!echeck(document.contact.email.value)) document.getElementById('inpEmail').className = 'error';
		else t++;
		
	if (t==3 ) document.contact.submit();
	return false;
}


<!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
cssdropdownRoot = document.getElementById("cssdropdown");
for (x=0; x<cssdropdownRoot.childNodes.length; x++) {
node = cssdropdownRoot.childNodes[x];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}

if (window.attachEvent)
window.attachEvent("onload", startList)
else
window.onload=startList;

//--><!]]>

