function checkForm(form) {
 str = "Nu ai introdus:\n";

 if (form.nume.value == "") {
   str += "- nume\n"; }

 if (form.prenume.value == "") {
   str += "- prenume\n"; }

 if (form.strada.value == "") {
   str += "- strada\n"; }

 if (form.localitate.value == "") {
   str += "- localitatea\n"; }
   
 if (form.cod.value == "") {
   str += "- codul\n"; }

  if (form.judet.value == "") {
   str += "- judetul\n"; }
   
  if (form.email.value.search(/^[-\.\w\&_]*@[a-zA-Z0-9\&_][-\.\w\&_]*\.[a-zA-Z]{2,3}$/) < 0) {
   str += '- adresa de e-mail, sau este incorecta!\n'; }

 if (str == "Nu ai introdus:\n") {
	form.reset;
 	return true;
    }else {
    alert(str);
    return false;
    }
}


function popup(mylink, windowname)
{
	w = 616;
	h = 508;
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;

if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
myRef = window.open(''+href,'mywin',
'left='+wleft+',top='+wtop+',width=616,height=508,toolbar=1,resizable=0,scrollbars=no');


//window.open(href, windowname, 'left=20,top=20,width=600,height=450,scrollbars=no');
return false;
}

function newWindow(mylink, windowname)
{
	w = 600;
	h = 450;
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;

if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
myRef = window.open(''+href,'mywin','toolbar=1,resizable=1,scrollbars=yes');


//window.open(href, windowname, 'left=20,top=20,width=600,height=450,scrollbars=no');
return false;
}


function wopen(url, name, w, h)
{
  // Fudge factors for window decoration space.
  // In my tests these work well on all platforms & browsers.
  //w += 32;
  //h += 96;
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;
  // IE5 and other old browsers might allow a window that is
  // partially offscreen or wider than the screen. Fix that.
  // (Newer browsers fix this for us, but let's be thorough.)
  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }
  var win = window.open(url,
    name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=no, resizable=no');
  // Just in case width and height are ignored
  win.resizeTo(w, h);
  // Just in case left and top are ignored
  win.moveTo(wleft, wtop);
  win.focus();
}

