// JavaScript Document
if (document.images) {
acasa1 = new Image
acasa2 = new Image

despre1 = new Image
despre2 = new Image

servicii1 = new Image
servicii2 = new Image

portofoliu1 = new Image
portofoliu2 = new Image

contact1 = new Image
contact2 = new Image

acasa1.src = "../images/acasa.jpg"
acasa2.src = "../images/acasa-2.jpg"

despre1.src = "../images/despre-noi.jpg"
despre2.src = "../images/despre-noi-2.jpg"

servicii1.src = "../images/servicii.jpg"
servicii2.src = "../images/servicii-2.jpg"

portofoliu1.src = "../images/portofoliu.jpg"
portofoliu2.src = "../images/portofoliu-2.jpg"

contact1.src = "../images/contact.jpg"
contact2.src = "../images/contact-2.jpg"

}
var detect = navigator.userAgent.toLowerCase();
var opera,moz,msie,w3c;
		var hiddencode;

function checkIt(string)
{
        place = detect.indexOf(string) + 1;
        thestring = string;
        return place;
}

function Trim(strToTrim) {
	while(strToTrim.charAt(0)==' '){strToTrim = strToTrim.substring(1,strToTrim.length);}
	while(strToTrim.charAt(strToTrim.length-1)==' '){strToTrim = strToTrim.substring(0,strToTrim.length-1);}
	return strToTrim;
}

function emailAddressIsValid(str){
	var emailAddressFormat = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,3}$/;
	if (!(emailAddressFormat.test(str))){
		return false;
	}
	return true;
}
		function VerifyEmailFrm(frm){
			var inside2;
			if (checkIt('opera')) opera = true 
			else if (checkIt('msie')) msie = true
			else if (!checkIt('compatible')) moz = true
			w3c=document.getElementById && document.createElement && !msie && !opera;

			
 			if (Trim(frm.txtNewsEmail.value) == "") {if (w3c) { document.getElementById("newserr").innerHTML = 'Introdu adresa de Email!'; } 
			else  if (document.all) {
			 var inside2 = document.all("newserr");
				inside2.innerHTML =''; inside2.innerHTML ='Introdu adresa de Email'; } frm.txtNewsEmail.focus();return false;} 
			if (!emailAddressIsValid(Trim(frm.txtNewsEmail.value))) { if (w3c) { document.getElementById("newserr").innerHTML = '<font color=#FFBA00>Introdu o adresa de Email valida !</font>'; }
			   else  if (document.all) {
			   			 var inside2 = document.all("newserr");
				inside2.innerHTML =''; inside2.innerHTML ='Introdu o adresa de Email valida';} frm.txtNewsEmail.focus();return false;}
			return true;
		}
		


