
function ApriPop(file,H,W){
window.open(file, '', 'width='+W+',height='+H+',left=0,top=0,resizable=no,menubar=no,toolbar=no, scrollbars=no,locations=no,status=no');
}



function apriFoto(foto){
	img = new Image;
	img.src = foto;
	html = '<html>\n<head>\n<title>Amref</title></head>\n<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" scroll="0"><center><img src="' + foto + '" border=0 ></center><!--<br><a href="javascript:window.close()">Close</a>\n --></body>\n</html>';
	popupImage = window.open('','_blank','width=570,height=435', 'toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0, status=1');
 	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	};

	
	function apriFlash(foto){
	img = new Image;
	img.src = foto;
	html = '<html>\n<head>\n<title>Amref</title></head>\n<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" scroll="0"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="700" height="400" id="swf_header"> <param name=movie value="' + foto + ' "><param name=quality value=high><param name=bgcolor value=#000000><param name=wmode value=transparent><embed src="' + foto + '" bgcolor=#000000 wmode=transparent width="700" height="400" quality=high			type="application/x-shockwave-flash" name="swf_header" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object><!--<br><a  href="javascript:window.close()">Close</a>\n --></body>\n</html>';
	popupImage = window.open('','_blank','width=700,height=400', 'toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0, status=1');
 	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	};
	
	
	
	
	function showVelina(divName){
		document.getElementById(divName).style.display="block";	
	}

	function hideVelina(divName){
		divObj = document.getElementById(divName);		
		//flashObj = divObj.getElementsByTagName('object');		
		//flashObj[0].pause();
		divObj.innerHTML = divObj.innerHTML;
		divObj.style.display="none";
	}
	
	
	

	function toggle(objName) {
	
		objDiv = document.getElementById(objName);
	
			if (objDiv.style.display == 'none') {
				objDiv.style.display = "block";		
			}
			else
			{
			objDiv.style.display = "none";
			}
	}

	
	function trim(stringa) {
			
		while (stringa.substring(0,1) == ' ') {
			stringa = stringa.substring(1, stringa.length);
		}
		
		while (stringa.substring(stringa.length-1, stringa.length) == ' ') {
			stringa = stringa.substring(0,stringa.length-1);
		}
		
		return stringa;
		
	}
	
	function validateMail(email) {
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		var address = email;
		return reg.test(address);
	}

