function refreshimage(pozaid){
	document.getElementById(pozaid).src = document.getElementById(pozaid).src+"#";
}

function set_eng(x)
{	 
	var im = new Image();
	im.src='/include/set_lang.php?id='+x;	
	//alert(im.src);
}

function Player(film)
{
	var sir = '<embed src="/media/player.swf" width="320" height="240" allowscriptaccess="always" allowfullscreen="true" flashvars="height=240&width=320&file=/media/'+ film + '&image=/images/imaginea.jpg&autostart=true&overstretch=false&showeq=false&searchbar=false" />';
	document.getElementById("player").innerHTML = sir;
}
 
function onover(objid,color)
{
	var x=document.getElementById(objid);
	x.style.backgroundColor='#'+color;
	x.style.color='#FFFFFF';
}

function onout(objid)
{
 var x=document.getElementById(objid);
 x.style.backgroundColor='#C6CDD3';
 x.style.color='#000000';
}

//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function popup( pFileName, xx,yy)
{
	window.open(pFileName, "USH", "fullscreen=no,location=no,scrollbars=YES, menubars=no,  toolbars=no, resizable=yes, left=300, top=200, width=" + xx + ", height="+ yy);
}
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

function Expand(idOfElement, itemId)
{
	//Find the content and the indicator images
	var listing = document.getElementById(idOfElement);
	var expand = document.getElementById("ICG_ETH_EXPAND_" + itemId);
	var collapse = document.getElementById("ICG_ETH_COLLAPSE_" + itemId);
	if(listing.style.display == "none")
	{
		listing.style.display = "";
		//Ensure that we have the expand and collapse images
		if(expand != null)
		{
			expand.style.display = "none";
			collapse.style.display = "";
		}
	}else{
		listing.style.display = "none";
		//Enusre that we have the expand and collapse images
		if(expand != null)
		{
			expand.style.display = "";
			collapse.style.display = "none";
		}
	}
}

function verifica()
{
	if(window.document.INSCRIE.NUME.value==""){alert("Introduceti numele dumneavoastra!");return false;}
	if(window.document.INSCRIE.PRENUME.value==""){alert("Introduceti prenumele dumneavoastra!");return false;}
	if(window.document.INSCRIE.EMAIL.value==""){alert("Introduceti adresa dumneavoastra de e-mail!");return false;}
	var str = window.document.INSCRIE.EMAIL.value;
	if (window.RegExp) 
	{
		var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
		var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$";
		var reg1 = new RegExp(reg1str);
		var reg2 = new RegExp(reg2str);   
		if (!reg1.test(str) && reg2.test(str))  
		{
			return true;
		}else{	
			alert("Introduceti corect adresa dvs de e-mail!");
			return false;
		}
	}else{
		if(str.indexOf("@") < 0)    
		{
			alert("Introduceti corect adresa dvs de e-mail!");
			return false;
		}
	}
return true;
}

	function activateMenu(clasa){
		$(clasa + " li").has("ul").find('> a').addClass("haschild").attr("href","#")
		$(clasa + " > li").hover(function(){
				$(this).removeClass('menuhover').addClass('menuhover');
				$(this).find('ul').css({'display':'block'});
			},function(){
				$(this).removeClass('menuhover');
				$(this).find('ul').css({'display':'none'});
		});
	}
$(function(){ 
  activateMenu('.meniubar');
  $(".listphoto a").slider();
});

