function expand(thistag,x) {
   styleObj=document.getElementById(thistag).style;
   if (styleObj.display=='none' && x=='1') {styleObj.display='';}
   else {styleObj.display='none';}
}
function popUp(URL,x,y,left,top)
{
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+ x +',height='+ y +',left ='+ left +',top = '+ top +'');");
}
function popUp1(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=400,left = 262,top = 134');");
}

function checkform_reg ( form )
{
  if (form.nume.value=="")
     {
           alert("Introduceti numele!");
           form.nume.focus();
           return false ;

     }
  if (form.prenume.value=="")
     {
           alert("Introduceti prenumele!");
           form.prenume.focus();
           return false ;

     }
  if (form.email1.value=="")
     {
           alert("Introduceti adresa de e-mail!");
           form.email1.focus();
           return false ;

     }
  if (form.pass1.value=="")
     {
           alert("Introduceti parola!");
           form.pass1.focus();
           return false ;

     }
  if (form.pass2.value=="")
     {
           alert("Introduceti parola de confirmare!");
           form.pass2.focus();
           return false ;
     }
  if (form.pass1.value!="" && form.pass1.value!=form.pass2.value)
     {
           alert("Introduceti parola de confirmare corecta!");
           form.pass2.focus();
           return false ;
     }
  if (form.cnpcif.value=="")
     {
           alert("Introduceti CNP!");
           form.cnpcif.focus();
           return false ;
     }
  if (form.tel.value=="")
     {
           alert("Introduceti numarul de telefon!");
           form.tel.focus();
           return false ;
     }

}

/*---------------------------------------*/
var stopCycle=0;
var lastBannerTab;
var lastBannerTabTimeout;
function switchBanner(link,file,from,idBut){
//se opreste ciclarea la click
if (from==0){
				clearTimeout(lastBannerTabTimeout);
				stopCycle=1;
				setTimeout('stopCycle=0',9900);
				if (idBut+1<bannerList['link'].length)
						lastBannerTabTimeout=setTimeout('cycleBanners('+bannerList['link'].length+','+(idBut+1)+',1)',10000);
					else
						lastBannerTabTimeout=setTimeout('cycleBanners('+bannerList['link'].length+',0,1)',10000);
				}

//se schimba link si banner
document.getElementById('bannerLink').href=link;
document.getElementById('bannerImg').src=file;

//se marcheaza butonul curent
if (lastBannerTab)
				{
				lastBannerTab.style.borderTop='2px solid #CCCCCC';
				lastBannerTab.style.borderBottom='2px solid #CCCCCC';
				lastBannerTab.style.background='#125896';
				}
document.getElementById('bannerTab'+idBut).style.borderTop='2px solid #000000';
document.getElementById('bannerTab'+idBut).style.borderBottom='2px solid #000000';
document.getElementById('bannerTab'+idBut).style.background='#75A128';
lastBannerTab=document.getElementById('bannerTab'+idBut);


return false;
}

function cycleBanners(nr,id){
if (stopCycle==0){
						switchBanner(bannerList['link'][id],bannerList['banner'][id],1,id);
						if (id+1<nr)
								lastBannerTabTimeout=setTimeout('cycleBanners('+nr+','+(id+1)+',1)',2500);
							else
								lastBannerTabTimeout=setTimeout('cycleBanners('+nr+',0,1)',2500);
			}
}

