/*
Designed and developed by Galaxy Design
www.galaxydesign.ro
*/
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function displayLargerImage($img,width,height)	{ //display a popup with large version of the image
	
	 
	 var wleft = (screen.width - width) / 2;
     var wtop = (screen.height - height) / 2-100;
	 
	 Popup = window.open('/img.php?img='+$img,'','toolbar=no,status=0,scrollbars=no,resizable=yes,width='+width+', height='+height+',top='+wtop+',left='+wleft);
	
}


function checkemail(email){
	var str=email;
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (filter.test(str))
		return true;
	else
	{
		return false;
	}
}


function recomanda($pageid) { 
	var w = '710';
	var h = '400';
	var wleft = (screen.width - w) / 2;
    var wtop = ((screen.height - h) / 2) - 100;
	window.open('/recomanda.php?id='+$pageid,'TrustMedia','width='+w+',height='+h+',top='+wtop+',left='+wleft); 
}

function toprint($pageid) 
{ 
	var w = '710';
	var h = '600';
	var wleft = (screen.width - w) / 2;
    var wtop = ((screen.height - h) / 2) - 100;
	window.open('/print.php?id='+$pageid,'TrustMedia','scrollbars=1,width='+w+',height='+h+',top='+wtop+',left='+wleft); 
}



function scroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 1500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

scroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(scroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

scroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

scroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

scroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

scroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

scroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

var mycarousel_itemList = [
    {url: '/produse-adidas.html', img: '/images/brands/adidas.jpg', imghover: '/images/brands/adidas_hover.jpg', title: 'Produse Adidas'},
    {url: '/produse-diesel.html', img: '/images/brands/diesel.jpg', imghover: '/images/brands/diesel_hover.jpg', title: 'Produse Diesel'},
    {url: '/produse-kappa.html', img: '/images/brands/kappa.jpg', imghover: '/images/brands/kappa_hover.jpg', title: 'Produse Kappa'},
    {url: '/produse-le_coq_sportif.html', img: '/images/brands/le_coq_sportif.jpg', imghover: '/images/brands/le_coq_sportif_hover.jpg', title: 'Produse Le Coq Sportif'},
    {url: '/produse-lotto.html', img: '/images/brands/lotto.jpg', imghover: '/images/brands/lotto_hover.jpg', title: 'Produse Lotto'},
    {url: '/produse-nike.html', img: '/images/brands/nike.jpg', imghover: '/images/brands/nike_hover.jpg', title: 'Produse Nike'},
    {url: '/produse-puma.html', img: '/images/brands/puma.jpg', imghover: '/images/brands/puma_hover.jpg', title: 'Produse Puma'},
    {url: '/produse-reebok.html', img: '/images/brands/reebok.jpg', imghover: '/images/brands/reebok_hover.jpg', title: 'Produse Reebok'},
    {url: '/produse-umbro.html', img: '/images/brands/umbro.jpg', imghover: '/images/brands/umbro_hover.jpg', title: 'Produse Umbro'}
];


function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt)
{
    // The index() method calculates the index from a
    // given index who is out of the actual item range.
    var idx = carousel.index(i, mycarousel_itemList.length);
    carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
};

function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt)
{
    carousel.remove(i);
};

/**
 * Item html creation helper.
 */
function mycarousel_getItemHTML(item)
{
	return '<div class="newscell"><a href="' + item.url + '" title="' + item.title + '" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'' + item.title + '\',\'\',\'' + item.imghover + '\',1)"><img src="' + item.img + '" alt="' + item.title + '" name="' + item.title + '" border="0"></a></div>';
};



function select_type()
{
	if (document.getElementById('tip_factura').value == "fizica")
	{
		document.getElementById('juridica').style.display = 'none';
	}
	else if (document.getElementById('tip_factura').value == "juridica")
	{
		document.getElementById('juridica').style.display = 'inline';
	}
}
function validate_reg_form()
{
		var filter=/^[A-Za-z0-9_\-.]+@+[A-Za-z_0-9\-.]+\.[A-Za-z][^\.]+$/
		if (document.getElementById('user').value == "")
		{
			alert("Va rugam introduceti numele de utilizator!");
			isValid = false;
			document.getElementById('user').focus();
		}
		else if (document.getElementById('parola').value == "")
		{
			alert("Va rugam introduceti corect parola!");
			isValid = false;
			document.getElementById('parola').focus();
		}
		else if (document.getElementById('confirmaparola').value == "" || document.getElementById('confirmaparola').value != document.getElementById('parola').value)
		{
			alert("Va rugam confirmati parola!");
			isValid = false;
			document.getElementById('confirmaparola').focus();
		}
		else if (document.getElementById('nume').value == "")
		{
			alert("Va rugam introduceti numele!");
			isValid = false;
			document.getElementById('nume').focus();
		}
		else if (document.getElementById('prenume').value == "")
		{
			alert("Va rugam introduceti prenumele!");
			isValid = false;
			document.getElementById('prenume').focus();
		}
		else if (document.getElementById('adresa').value == "")
		{
			alert("Va rugam introduceti adresa!");
			isValid = false;
			document.getElementById('adresa').focus();
		}
		else if (document.getElementById('localitate').value == "")
		{
			alert("Va rugam introduceti localitatea!");
			isValid = false;
			document.getElementById('localitate').focus();
		}
		else if (document.getElementById('judet').value == "")
		{
			alert("Va rugam selectati judetul!");
			isValid = false;
			document.getElementById('judet').focus();
		}
		else if (document.getElementById('telefon').value == "")
		{
			alert("Va rugam introduceti telefonul!");
			isValid = false;
			document.getElementById('telefon').focus();
		}
		else if (document.getElementById('mail').value == "" || !filter.test(document.getElementById('mail').value))
		{
			alert("Va rugam introduceti o adresa de e-mail valida!");
			isValid = false;
			document.getElementById('mail').focus();
		}
		else if (document.getElementById('tip_factura').value == "fizica")
		{
			if (document.getElementById('cnp').value == "")
			{
				alert("Va rugam introduceti CNP-ul!");
				isValid = false;
				document.getElementById('cnp').focus();
			}
			else if (document.getElementById('act_id').value == "")
			{
				alert("Va rugam alegeti tipul actului de identitate!");
				isValid = false;
				document.getElementById('act_id').focus();
			}
			else if (document.getElementById('serie').value == "")
			{
				alert("Va rugam introduceti seria actului de identitate!");
				isValid = false;
				document.getElementById('serie').focus();
			}
			else if (document.getElementById('numar').value == "")
			{
				alert("Va rugam introduceti numarul actului de identitate!");
				isValid = false;
				document.getElementById('numar').focus();
			}
			else
			{
				isValid = true;
			}
		}
		else if (document.getElementById('tip_factura').value == "juridica")
		{
			if (document.getElementById('cnp').value == "")
			{
				alert("Va rugam introduceti CNP-ul!");
				isValid = false;
				document.getElementById('cnp').focus();
			}
			else if (document.getElementById('act_id').value == "")
			{
				alert("Va rugam alegeti tipul actului de identitate!");
				isValid = false;
				document.getElementById('act_id').focus();
			}
			else if (document.getElementById('serie').value == "")
			{
				alert("Va rugam introduceti seria actului de identitate!");
				isValid = false;
				document.getElementById('serie').focus();
			}
			else if (document.getElementById('numar').value == "")
			{
				alert("Va rugam introduceti numarul actului de identitate!");
				isValid = false;
				document.getElementById('numar').focus();
			}
			else if (document.getElementById('firma').value == "")
			{
				alert("Va rugam introduceti numele firmei!");
				isValid = false;
				document.getElementById('firma').focus();
			}
			else if (document.getElementById('cui').value == "")
			{
				alert("Va rugam introduceti codul unic de inregistrare al firmei!");
				isValid = false;
				document.getElementById('cui').focus();
			}
			else if (document.getElementById('regcom').value == "")
			{
				alert("Va rugam introduceti numarul de inregistrare la Registrul Comertului!");
				isValid = false;
				document.getElementById('regcom').focus();
			}
			else if (document.getElementById('adresafirma').value == "")
			{
				alert("Va rugam introduceti adresa firmei!");
				isValid = false;
				document.getElementById('adresafirma').focus();
			}
			else if (document.getElementById('banca').value == "")
			{
				alert("Va rugam introduceti numele bancii!");
				isValid = false;
				document.getElementById('banca').focus();
			}
			else if (document.getElementById('iban').value == "")
			{
				alert("Va rugam introduceti codul IBAN!");
				isValid = false;
				document.getElementById('iban').focus();
			}
			else
			{
				isValid = true;
			}
		}
		else
		{
			isValid = true;
		}
	
	if (isValid)
	{
		if (document.register.termeni.checked == false)
		{
			alert("Nu ati fost de acord cu termenii si conditiile!");
			isValid = false;
			//document.register.termeni.focus();
		}
		else
		{
			isValid = true;
		}
	}
	
	if (isValid)
	{
		document.register.submit();
	}
	
	
}
function validate_edit_details()
{
		var filter=/^[A-Za-z0-9_\-.]+@+[A-Za-z_0-9\-.]+\.[A-Za-z][^\.]+$/
		if (document.getElementById('nume').value == "")
		{
			alert("Va rugam introduceti numele!");
			isValid = false;
			document.getElementById('nume').focus();
		}
		else if (document.getElementById('prenume').value == "")
		{
			alert("Va rugam introduceti prenumele!");
			isValid = false;
			document.getElementById('prenume').focus();
		}
		else if (document.getElementById('adresa').value == "")
		{
			alert("Va rugam introduceti adresa!");
			isValid = false;
			document.getElementById('adresa').focus();
		}
		else if (document.getElementById('localitate').value == "")
		{
			alert("Va rugam introduceti localitatea!");
			isValid = false;
			document.getElementById('localitate').focus();
		}
		else if (document.getElementById('judet').value == "")
		{
			alert("Va rugam selectati judetul!");
			isValid = false;
			document.getElementById('judet').focus();
		}
		else if (document.getElementById('telefon').value == "")
		{
			alert("Va rugam introduceti telefonul!");
			isValid = false;
			document.getElementById('telefon').focus();
		}
		else if (document.getElementById('mail').value == "" || !filter.test(document.getElementById('mail').value))
		{
			alert("Va rugam introduceti o adresa de e-mail valida!");
			isValid = false;
			document.getElementById('mail').focus();
		}
		else if (document.getElementById('tip_factura').value == "fizica")
		{
			if (document.getElementById('cnp').value == "")
			{
				alert("Va rugam introduceti CNP-ul!");
				isValid = false;
				document.getElementById('cnp').focus();
			}
			else if (document.getElementById('act_id').value == "")
			{
				alert("Va rugam alegeti tipul actului de identitate!");
				isValid = false;
				document.getElementById('act_id').focus();
			}
			else if (document.getElementById('serie').value == "")
			{
				alert("Va rugam introduceti seria actului de identitate!");
				isValid = false;
				document.getElementById('serie').focus();
			}
			else if (document.getElementById('numar').value == "")
			{
				alert("Va rugam introduceti numarul actului de identitate!");
				isValid = false;
				document.getElementById('numar').focus();
			}
			else
			{
				isValid = true;
			}
		}
		else if (document.getElementById('tip_factura').value == "juridica")
		{
			if (document.getElementById('cnp').value == "")
			{
				alert("Va rugam introduceti CNP-ul!");
				isValid = false;
				document.getElementById('cnp').focus();
			}
			else if (document.getElementById('act_id').value == "")
			{
				alert("Va rugam alegeti tipul actului de identitate!");
				isValid = false;
				document.getElementById('act_id').focus();
			}
			else if (document.getElementById('serie').value == "")
			{
				alert("Va rugam introduceti seria actului de identitate!");
				isValid = false;
				document.getElementById('serie').focus();
			}
			else if (document.getElementById('numar').value == "")
			{
				alert("Va rugam introduceti numarul actului de identitate!");
				isValid = false;
				document.getElementById('numar').focus();
			}
			else if (document.getElementById('firma').value == "")
			{
				alert("Va rugam introduceti numele firmei!");
				isValid = false;
				document.getElementById('firma').focus();
			}
			else if (document.getElementById('cui').value == "")
			{
				alert("Va rugam introduceti codul unic de inregistrare al firmei!");
				isValid = false;
				document.getElementById('cui').focus();
			}
			else if (document.getElementById('regcom').value == "")
			{
				alert("Va rugam introduceti numarul de inregistrare la Registrul Comertului!");
				isValid = false;
				document.getElementById('regcom').focus();
			}
			else if (document.getElementById('adresafirma').value == "")
			{
				alert("Va rugam introduceti adresa firmei!");
				isValid = false;
				document.getElementById('adresafirma').focus();
			}
			else if (document.getElementById('banca').value == "")
			{
				alert("Va rugam introduceti numele bancii!");
				isValid = false;
				document.getElementById('banca').focus();
			}
			else if (document.getElementById('iban').value == "")
			{
				alert("Va rugam introduceti codul IBAN!");
				isValid = false;
				document.getElementById('iban').focus();
			}
			else
			{
				isValid = true;
			}
		}
		else
		{
			isValid = true;
		}
	
	if (isValid)
	{
		document.process.submit();
	}
}
function validate_change_pass()
{
	if (document.getElementById('parola').value == "")
		{
			alert("Va rugam introduceti corect parola!");
			isValid = false;
			document.getElementById('parola').focus();
		}
		else if (document.getElementById('confirmaparola').value == "" || document.getElementById('confirmaparola').value != document.getElementById('parola').value)
		{
			alert("Va rugam confirmati parola!");
			isValid = false;
			document.getElementById('confirmaparola').focus();
		}	
		else
		{
			isValid = true;
		}

	if (isValid)
	{
		document.change_pass.submit();
	}
}
function validate_process()
{
		var filter=/^[A-Za-z0-9_\-.]+@+[A-Za-z_0-9\-.]+\.[A-Za-z][^\.]+$/


		if (document.getElementById('firma').value == "")
		{
			alert("Va rugam introduceti denumirea cumparatorului!");
			isValid = false;
			document.getElementById('firma').focus();
		}
		else if (document.getElementById('cui').value == "")
		{
			alert("Va rugam introduceti codul unic de inregistrare al firmei!");
			isValid = false;
			document.getElementById('cui').focus();
		}
		else if (document.getElementById('regcom').value == "")
		{
			alert("Va rugam introduceti numarul de inregistrare la Registrul Comertului!");
			isValid = false;
			document.getElementById('regcom').focus();
		}
		else if (document.getElementById('adresafirma').value == "")
		{
			alert("Va rugam introduceti adresa firmei!");
			isValid = false;
			document.getElementById('adresafirma').focus();
		}
		else if (document.getElementById('localitate').value == "")
		{
			alert("Va rugam introduceti localitatea!");
			isValid = false;
			document.getElementById('localitate').focus();
		}
		else if (document.getElementById('judet').value == "")
		{
			alert("Va rugam selectati judetul!");
			isValid = false;
			document.getElementById('judet').focus();
		}
		else if (document.getElementById('banca').value == "")
		{
			alert("Va rugam introduceti numele bancii!");
			isValid = false;
			document.getElementById('banca').focus();
		}
		else if (document.getElementById('iban').value == "")
		{
			alert("Va rugam introduceti codul IBAN!");
			isValid = false;
			document.getElementById('iban').focus();
		}
		else if (document.getElementById('telefon').value == "")
		{
			alert("Va rugam introduceti telefonul!");
			isValid = false;
			document.getElementById('telefon').focus();
		}
		else if (document.getElementById('mail').value == "" || !filter.test(document.getElementById('mail').value))
		{
			alert("Va rugam introduceti o adresa de e-mail valida!");
			isValid = false;
			document.getElementById('mail').focus();
		}
		else if (document.getElementById('nume').value == "")
		{
			alert("Va rugam introduceti numele reprezentantului!");
			isValid = false;
			document.getElementById('nume').focus();
		}
		else if (document.getElementById('prenume').value == "")
		{
			alert("Va rugam introduceti prenumele reprezentantului!");
			isValid = false;
			document.getElementById('prenume').focus();
		}
		else if (document.getElementById('cnp').value == "")
		{
			alert("Va rugam introduceti CNP-ul!");
			isValid = false;
			document.getElementById('cnp').focus();
		}
		else if (document.getElementById('act_id').value == "")
		{
			alert("Va rugam alegeti tipul actului de identitate!");
			isValid = false;
			document.getElementById('act_id').focus();
		}
		else if (document.getElementById('serie').value == "")
		{
			alert("Va rugam introduceti seria actului de identitate!");
			isValid = false;
			document.getElementById('serie').focus();
		}
		else if (document.getElementById('numar').value == "")
		{
			alert("Va rugam introduceti numarul actului de identitate!");
			isValid = false;
			document.getElementById('numar').focus();
		}
		else
		{
			isValid = true;
		}
	
	if (isValid)
	{
		if (document.getElementById('user'))
		{
			if (document.getElementById('user').value != "")
			{
				if (document.getElementById('parola').value == "")
				{
					alert("Va rugam introduceti corect parola!");
					isValid = false;
					document.getElementById('parola').focus();
				}
				else if (document.getElementById('confirmaparola').value == "" || document.getElementById('confirmaparola').value != document.getElementById('parola').value)
				{
					alert("Va rugam confirmati parola!");
					isValid = false;
					document.getElementById('confirmaparola').focus();
				}
				else
				{
					isValid = true;
				}
			}
		}
	}
	if (isValid)
	{
		if (document.process.termeni.checked == false)
		{
			alert("Nu ati fost de acord cu termenii si conditiile!");
			isValid = false;
			//document.register.termeni.focus();
		}
		else
		{
			isValid = true;
		}
	}
	
	if (isValid)
	{
		document.process.submit();
	}
	
	
}

function addtocart(id)
{
	if (id)
	{
		$form='addtocart_'+id;
		document.getElementById($form).submit();
	}
}


function validate_request()
{
	if (document.getElementById('checkfield').value!="") 
	{
		return false;
	}
	else
	{
		if (document.getElementById('namefield').value=="") 
		{ 
			alert("Va rugam introduceti numele persoanei de contact!");
			document.getElementById('namefield').focus();
			return false;
		}	
		else if (document.getElementById('phonefield').value=="") 
		{ 
			alert("Va rugam introduceti numarul de telefon pe care doriti sa fiti contactat!");
			document.getElementById('phonefield').focus();
			return false;
		}	
		else if (!checkemail(document.getElementById('emailfield').value)) 
		{ 
			alert("Va rugam introduceti o adresa de email valida pe care doriti sa fiti contactat!");
			document.getElementById('emailfield').focus();
			return false;
		}
		else if (document.getElementById('requestsfield').value=="") 
		{ 
			alert("Va rugam introduceti detalii asupra cererii!");
			document.getElementById('requestsfield').focus();
			return false;
		}
	}
}

