<!--
// browser detection:
var ua = navigator.userAgent;
var ns = (navigator.appName.toLowerCase().indexOf("netscape")!=-1)?1:0;
var ns4 = (document.layers)?1:0;
var ns6 = (document.getElementById && ns)?1:0;
var mac = (navigator.userAgent.toLowerCase().indexOf("mac")!=-1)?1:0;
var macie4 = (mac && !ns && parseInt(ua.substr(ua.indexOf("MSIE")+4,2)) <= 4)?1:0;
var macie = (mac && !ns)?1:0;

// array for header menu:
var arrTopMnu=new Array(
"images/mnul_hom_off.gif","images/mnul_hom_on.gif","home.shtml","Home",24,8,"hom",
"images/mnul_con_off.gif","images/mnul_con_on.gif","contact.shtml","Contact",36,8,"con"
)
var step1=7



var newWin;
function WinOpen(url,w,h){
	if (new String(newWin)!="undefined" && newWin!=null) if (!newWin.closed) newWin.close();
	newWin=window.open(url,"WindowProtectiaMediului","width="+w+",height="+h+",top=0,left=0,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes,z-lock=yes");
	newWin.focus();
	newWin.moveTo((screen.Width - w)/2, (screen.Height - h)/2);
}

var newWin2;
function WinOpen2(url,w,h){
	if (new String(newWin2)!="undefined" && newWin2!=null) if (!newWin2.closed) newWin2.close();
	newWin2=window.open(url,"WindowProtectiaMediului2"+w+h,"width="+w+",height="+h+",top=0,left=0,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=no,menubar=no,status=no,toolbar=no,scrollbars=no,z-lock=yes");
	newWin2.focus()
	newWin2.moveTo((screen.Width - w)/2, (screen.Height - h)/2);
}

// START: Rollover functions >>>
function Preload(arrFrom,arrToGen,act) {
	var l = eval(arrFrom + '_on.length');
	for (var i=0; i<l; i++) {
		eval(arrToGen + '_on[i] = new Image()');
		eval(arrToGen + '_on[i].src = ' + arrFrom + '_on[i]');
		eval(arrToGen + '_off[i] = new Image()');
		eval(arrToGen + '_off[i].src = ' + arrFrom + '_off[i]');
		if (act==1) {
			eval(arrToGen + '_act[i] = new Image()');
			eval(arrToGen + '_act[i].src = ' + arrFrom + '_act[i]');
		}
	}
}

function Swap() {
	var imgName = Swap.arguments[2] + Swap.arguments[0];
	var index = (Swap.arguments.length >= 4) ? parseInt(Swap.arguments[3]) : parseInt(Swap.arguments[0]);
	document.images[imgName].src = eval(Swap.arguments[2] + '_' + Swap.arguments[1] + '[' + index + '].src');
}
// <<< END: Rollover functions

//getting the content height:
var contH="100%"
var mnuH="100%"
var headerH=166
var footerH=40
function GetContentH(){
	if (ns) {
		contH=window.innerHeight-headerH-footerH
		mnuH=contH-31
	} else if (ua.toLowerCase().indexOf("windows")<0) {
		contH=document.body.clientHeight-headerH-footerH
		mnuH=contH-31
	}
}

// START: fixing the page content on resize >>>
FixNSWindow();
function FixNSWindow() {
	if (ns6 || ns && (parseInt(navigator.appVersion) == 4)) {
		if (typeof document.NS == 'undefined') document.NS = new Object;
		if (typeof document.NS.NS_scaleFont == 'undefined') {
			document.NS.FixCssInNS = new Object;
			document.NS.FixCssInNS.initWindowWidth = window.innerWidth;
			document.NS.FixCssInNS.initWindowHeight = window.innerHeight;
		}
		window.onresize = FixCssInNS;
	}
}
function FixCssInNS() {
	if (document.NS.FixCssInNS.initWindowWidth != window.innerWidth || document.NS.FixCssInNS.initWindowHeight != window.innerHeight) document.location = document.location;
}
ReloadWindow();
function ReloadWindow(){if (!ns && (ua.toLowerCase()).indexOf("windows")<0) setTimeout("window.onresize=new Function('window.location.reload()')",200);}
// <<< END: fixing the page content on resize

//-->

//Show/Hide tooltip
function showTip(text,ev){
	if (text != ""){
		if(!ns) { //Explorer
			document.all.tooltip.innerHTML = "&nbsp;" + text + "&nbsp;";
			document.all.tooltip.style.pixelLeft = event.clientX - 2 + document.body.scrollLeft;
			document.all.tooltip.style.pixelTop = event.clientY + 19 + document.body.scrollTop;
			document.all.tooltip.style.visibility = "visible";
		}
		else { 
			if (!ns6){//Netscape 4
				document.tooltip.document.open();
				document.tooltip.document.write("<layer class='layerNS'><TABLE border='0' cellpadding='0' cellspacing='0'><TR><TD colspan='3' bgcolor='#ECECEC' height='1'><IMG src='images/spacer.gif' width='1' height='1'></TD></TR><TR><TD bgcolor='#ECECEC' height='1'><IMG src='images/spacer.gif' width='1' width='1'></TD><TD class='tooltipTxt'>&nbsp;"+text+"&nbsp;</TD><TD bgcolor='#ECECEC' height='1'><IMG src='images/spacer.gif' width='1' width='1'></TD></TR><TR><TD colspan='3' bgcolor='#ECECEC' height='1'><IMG src='images/spacer.gif' width='1' height='1'></TD></TR></TABLE></layer>");
				document.tooltip.document.close();
				document.tooltip.left = ev.pageX - 7;
				document.tooltip.top = ev.pageY + 15;
				document.tooltip.visibility = "show";
			}
			else { //Netscape 6, 7
				var obj = document.getElementById("tooltip");
				obj.innerHTML = "&nbsp;" + text + "&nbsp;";
				if (navigator.userAgent.indexOf("Netscape/7") >= 0){
					obj.style.left = ev.pageX;
					obj.style.top = ev.pageY + 21;
				}
				else {
					obj.style.left = ev.pageX - 3;
					obj.style.top = ev.pageY + 17;
				}
				obj.style.visibility = "visible";
			}
		} 
	}
}
	
function hideTip(){
	if(!ns) { //Explorer
		document.all.tooltip.style.visibility="hidden";
	}
	else {
		if (!ns6)//Netscape 4
			document.tooltip.visibility = "hide";
		else {//Netscape 6
			var obj = document.getElementById("tooltip");
			obj.style.visibility = "hidden";
		}
	} 
}

function myOpenWin(hrf, w, h){
	var obj;
	if (hrf.indexOf(".pdf") >= 0) obj = window.open(hrf,"ViewerWindow","width=" + (screen.Width - 100) + ",height=" + (screen.Height - 200) + ",scrollbars=yes,resizable=yes,top=25,left=50");
	else obj = window.open(hrf,"ViewerWindow","width=" + w + ",height=" + h + ",scrollbars=yes,resizable=yes,top=" + ((screen.Height - parseInt(h))/2) + ",left=" + ((screen.Width - parseInt(w))/2));
	obj.focus();
}

function myOpenWin2(hrf, w, h){
	var obj2;
	if (hrf.indexOf(".pdf") >= 0) obj2 = window.open(hrf,"ViewerWindow2","width=" + (screen.Width - 100) + ",height=" + (screen.Height - 200) + ",scrollbars=yes,resizable=yes,top=25,left=50");
	else obj2 = window.open(hrf,"ViewerWindow2","width=" + w + ",height=" + h + ",scrollbars=yes,resizable=yes,top=" + ((screen.Height - parseInt(h))/2) + ",left=" + ((screen.Width - parseInt(w))/2));
	obj2.focus();
}