function ceckComment(){
	var d = document.forms['add-comments'];
	
	if(d.name.value==""){	alert('Nu ai completat numele tau!');	d.name.focus();   return false;}
	if(d.email.value==""){	
		
		alert('Nu ai completat adresa e e-mail!');	d.email.focus();	return false;
	
	}else{

		if(!validEmail(d.email.value)){
			alert('Emailul nu este corect.');
			d.email.focus();
			d.email.select();
			return false;
		}
		
	}
	
	
	
	if(d.comment.value==""){	alert('Nu ai scris comentariul tau!');	d.comment.focus();		return false;}
	
	return true;
}

function validEmail(adress){
	
	email = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$/	
	if (!email.test(adress)){ return false;	}else{ return true; }
	
}

function setPlayer(id,swf,w,h,fls){
	var FU = { 	movie:swf,
				width:w,
				height:h,
				majorversion:"7",
				build:"0",
				bgcolor:"#FFFFFF",
				wmode:"transparent",
				flashvars:fls };
	UFO.create(	FU, id);	
}

function showpic(img){

    picfile = new Image(); 
    picfile.src =(img); 
    
    w = picfile.width  + 20;
    h = picfile.height + 20;
    	
	day = new Date();
	id = day.getTime();
	
	window.open(img, 'xxx', 'toolbar=0,scrollbars=0,location=0,width='+w+', height='+h+', statusbar=0,menubar=0,resizable=0,left=810,top=450');

}
