function setSize(){
	var docHeight;
	if (typeof document.height != 'undefined') {
		docHeight = document.height;
	}
	else 
		if (document.compatMode && document.compatMode != 'BackCompat') {
			docHeight = document.documentElement.scrollHeight;
		}
	else 
		if (document.body && typeof document.body.scrollHeight !='undefined') {
			docHeight = document.body.scrollHeight;
		}
	div=document.getElementById("bl_mask");
	wrapper=document.getElementById("bl_wrapper");
	content=document.getElementById("content");
//	content_spacer=document.getElementById("content_spacer");
	div.style.width=document.body.clientWidth;
	if (docHeight<800)
		docHeight=800;
//	div.style.height=docHeight;
	div.style.height=0//wrapper.offsetHeight+content.offsetHeight+content_spacer.offsetHeight;
	//alert(div.style.height);
	}
	
//functie care arata/ascunde divu	
function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.visibility=='visible')
    vis.visibility = 'hidden';
  else
	vis.visibility='visible';
}

var msk=null;
var cont=null;
function openWindow(location, div){
	top['bl_content']=30
	top['bl_content_2']=230
	toggleLayer('bl_mask');
	msk=document.getElementById('bl_mask');
	cont=document.getElementById(div);
	cont.style.top=document.body.scrollTop+top[div];
	loadPage(div,null,location);
	turnOn(0);
}
function turnOn(i){
	if (i<=80){
		msk.style.opacity=i/100;
		msk.style.filter='alpha(opacity='+i+')';
		setTimeout("turnOn("+(i+4)+")",8);
		}
	else{
		document.getElementById('bl_loading').style.top=document.body.scrollTop+280;
		toggleLayer('bl_loading');
	}
}

function loaded(div){
setTimeout("toggleLayer('bl_loading')",1800);
setTimeout("toggleLayer('"+div+"')",1800);
}


function turnOffMask(i){
if (i>=0){
	msk.style.opacity=i/100;
	msk.style.filter='alpha(opacity='+i+')';
	setTimeout("turnOffMask("+(i-8)+")",5);
}
else{
	toggleLayer('bl_mask');
}
}

function kill(div){
	toggleLayer(div);
	turnOffMask(80);
	window.location.href='index.htm';
}


function waitUntil(destDate)
{
var curDate = null;
do { curDate = new Date(); }
while(curDate.getTime < destDate);
} 


//cod pentru incarcarea dinamica a continutului
var nn4 = (document.layers);
var nn6 = (document.getElementById && !document.all);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);

function loadPage(id,nestref,url) {
if (nn4) {
var lyr = (nestref)? eval('document.'+nestref+'.document.'+id) : document.layers[id]
lyr.load(url,lyr.clip.width)
}
else if(ie4) parent.contentFRM.location = url;
else if(ie5 || nn6) document.getElementById('contentFRM').src = url;
}

function showPage(id) {
if (ie4) {
document.all[id].innerHTML = parent.contentFRM.document.body.innerHTML;
}
else if(nn6 || ie5) { 
document.getElementById(id).innerHTML = window.frames['contentFRM'].document.getElementById('theBody').innerHTML;
   }
}
