var offsetxpoint=-60;offsetypoint=20;ie=document.all;ns=document.getElementById && !document.all;enabletip=false;
if (ie||ns) var tipobj=document.all? document.all["tooltip"] : document.getElementById? document.getElementById("tooltip") : ""
function ietruebody(){return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body}
function tip(text,width){if(ns||ie){if(typeof width!="undefined")tipobj.style.width=width+"px";tipobj.style.backgroundColor="#edeff2";tipobj.innerHTML=text;enabletip=true;return false;}}
function inittip(e){if(enabletip){var curX=(ns)?e.pageX:event.x+ietruebody().scrollLeft;curY=(ns)?e.pageY:event.y+ietruebody().scrollTop;rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20;bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20;leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000;if (rightedge<tipobj.offsetWidth)tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px";else if (curX<leftedge)tipobj.style.left="5px";else tipobj.style.left=curX+offsetxpoint+"px";if (bottomedge<tipobj.offsetHeight)tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px";else tipobj.style.top=curY+offsetypoint+"px";tipobj.style.visibility="visible";}}
function hidetip(){if (ns||ie){enabletip=false;tipobj.style.visibility="hidden";tipobj.style.left="-1000px";tipobj.style.backgroundColor='';tipobj.style.width='';}}
function f1(o,i){switch(i){case(0):o.style.backgroundColor="#EDEFF2";break;case(1):o.style.backgroundColor="#e2e6ee";break;case(2):o.style.backgroundColor="#F8F9FA";break;}}
function f2(s){window.location.href=s;}
function f3(su,st){with (window.open('about:blank','','scrollbars=no,width=400,height=300,left=100,top=100').document){writeln('<html><head><title>Loading image...</title><style>body{margin:0px;}</style><script>function ResizeImage(){');ns?writeln('window.innerWidth=document.images["pop"].width;window.innerHeight=document.images["pop"].height;}'):writeln('window.resizeTo(100,100);width=100-(document.body.clientWidth-document.images[0].width);height=100-(document.body.clientHeight-document.images[0].height);window.resizeTo(width,height);}');writeln('function doTitle(){document.title="'+st+'";}</script>');writeln('</head><body bgcolor=#e5e8ee leftMargin=0 topMargin=0 marginheight=0 marginwidth=0 scroll="no" onload="ResizeImage();doTitle();self.focus()" onblur="self.close()"><img name="pop" src="'+su+'" style="display:block"></body></html>');close();}}

function wconfirm(amessage, apagelocation){if (confirm(amessage)==true) window.location.href=apagelocation;}
function wopen(apage,aname){window.open(apage, aname, 'scrollbars,resizable,width=700,height=500');}
function combo_change(index){index==-2 ? document.getElementById("div_date").style.display = "block" : document.getElementById("div_date").style.display = "none";}
function date_change(a_edit)
{
 if (a_edit.value == "") return 0;
 a_date = new String(a_edit.value);
 a_rec = new Array(); a_rec = a_date.split('-');

 if (a_rec.length != 3 || (a_rec[0] <= 0) || (a_rec[1] <= 0) || (a_rec[2] <= 0)){alert("Ati introdus o data incorecta !!!\nFormatul corect este yyyy-mm-dd"); a_edit.value = "";return 0;}
 if ((Number(a_rec[0]) > 2010) || (Number(a_rec[0]) < 1900)){alert("Eroare : Alegeti anul in intervalul 1900-2010");a_edit.value = ""; return 0;}
 if ((Number(a_rec[1]) > 12  ) || (Number(a_rec[1]) < 0   )){alert("Eroare : Luna este introdusa gresit"          );a_edit.value = ""; return 0;}
 if ((Number(a_rec[2]) > 31  ) || (Number(a_rec[2]) < 0   )){alert("Eroare : Ziua este introdusa gresit"          );a_edit.value = ""; return 0;}
 return 1;
}
PX=10;PY=10;DX=600;DY=400;var ac=true;
function P(imageURL,imageTitle){var imgWin=window.open('','_blank','scrollbars=no,resizable=1,width='+DX+',height='+DY+',left='+PX+',top='+PY);if(!imgWin){return true;}imgWin.document.write('<html><head><title>'+imageTitle+'<\/title><script type="text\/javascript">\n'+
'function resizeWinTo(){if(!document.images.length){document.images[0]=document.layers[0].images[0];}'+'var oH=document.images[0].height,oW=document.images[0].width;if(!oH||window.doneAlready){return;}window.doneAlready=true;var x=window;x.resizeTo(oW+200,oH+200);var myW=0,myH=0,d=x.document.documentElement,b=x.document.body;\n'+
'if(x.innerWidth){myW=x.innerWidth;myH=x.innerHeight;}else if(d&&d.clientWidth){myW=d.clientWidth;myH=d.clientHeight;}\n'+'else if(b&&b.clientWidth){myW=b.clientWidth;myH=b.clientHeight;}\n'+'if(window.opera&&!document.childNodes){myW+=16;}\n'+
'x.resizeTo(oW=oW+((oW+200)-myW),oH=oH+((oH+200)-myH));var scW=screen.availWidth?screen.availWidth:screen.width;var scH=screen.availHeight?screen.availHeight:screen.height;if(!window.opera){x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2));}}'+
'<\/script><\/head><body onload="resizeWinTo();"'+(ac?' onblur="self.close();"':'')+'>'+(document.layers?('<layer left="0" top="0">'):('<div style="position:absolute;left:0px;top:0px;">'))+'<img src='+imageURL+' alt="Loading image ..." title="" onload="resizeWinTo();">'+(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');imgWin.document.close();if(imgWin.focus){imgWin.focus();}return false;}

document.onmousemove=inittip
