function mult(myId) {
	    a=parseInt(myId)+1;
		b='c'+a;
		c='c'+ myId;
		document.getElementById(b).style.display = 'inline';
        document.getElementById(c).style.display = 'none';
					$('a.xtrig').click();
}

function putin(myId) {
	    a=parseInt(myId)-1;
		b='c'+a;
		c='c'+ myId;
		document.getElementById(b).style.display = 'inline';
	    document.getElementById(c).style.display = 'none';
					$('a.xtrig').click();
}



function trimite_fr(theForm) {
if (theForm.author.value == "")
{
alert("Compléter votre nom!");
theForm.author.focus();
return (false);
}


var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(theForm.email.value)) {
alert('Compléter une adresse email valide!');
theForm.email.focus();
return (false);
}

/*
if (theForm.email.value == "")
{
alert("You must fill the email field!");
theForm.email.focus();
return (false);
}
*/

if (theForm.comment_body.value == "")
{
alert("Compléter votre commentaire!");
theForm.comment_body.focus();
return (false);
}

//alert("Your question has been sent and will be published after a preliminary check!");
}


function trimite_ro(theForm) {
if (theForm.author.value == "")
{
alert("Completati campul nume!");
theForm.author.focus();
return (false);
}


var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(theForm.email.value)) {
alert('Completati o adresa de mail valida!');
theForm.email.focus();
return (false);
}

/*
if (theForm.email.value == "")
{
alert("You must fill the email field!");
theForm.email.focus();
return (false);
}
*/

if (theForm.comment_body.value == "")
{
alert("Completati campul comentariu!");
theForm.comment_body.focus();
return (false);
}

//alert("Your question has been sent and will be published after a preliminary check!");
}



////////////////////////////////////show-hide/////////////////////////////////////



//shows/hides an id
function showhide(myId) {
	if (document.getElementById) {
		state = document.getElementById(myId).style.display
		if (state == 'block') {
			hideId(myId);
			$('a.xtrig').click();
			return false
		}
		else {
			showId(myId);
			$('a.xtrig').click();
			return false
		}
	}
	
//alert(document.getElementById("coda-slider-1").style.height);
	
//fireEvent(document.getElementById("grey-link"),'click');
//$('a.xtrig').click();

//clickLink("grey-link");

}

//hides an id
function hideId(myId) {
	if (document.getElementById) {
		document.getElementById(myId).style.display = 'none'
	}
}

//shows an id
function showId(myId) {
	if (document.getElementById) {
		document.getElementById(myId).style.display = 'block'
	}
}

function clickLink(linkobj) {
if (linkobj.getAttribute('onclick') == null) {
if (linkobj.getAttribute('href')) document.location = linkobj.getAttribute('href');
}
else linkobj.onclick();
}


function fireEvent(obj,evt){
	
	var fireOnThis = obj;
	if( document.createEvent ) {
	  var evObj = document.createEvent('MouseEvents');
	  evObj.initEvent( evt, true, false );
	  fireOnThis.dispatchEvent(evObj);
	} else if( document.createEventObject ) {
	  fireOnThis.fireEvent('on'+evt);
	}
}
