<!--
//opens a new popup window containing the page from parameter "url":
var newWin1;
function WinOpen1(url,title){
	newWin1=window.open(url,title,"width=800,height=600,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");
	//if (mac) win.resizeTo(w+25,h+50);
	newWin1.focus();
}
//opens a new popup window containing the image from parameter:
function ImageViewer1(picFileName){
	if (picFileName!=""){
		var viewWin = window.open("","imgWin","width=160,height=160,statusbar=no,resizable=no,scrollbars=no,top=50,left=50");
		viewWin.document.open();
		viewWin.document.write("<HTML><HEAD><TITLE>Vizualizare Imagine</TITLE><LINK rel='stylesheet' href='style.css'></HEAD><BODY bgcolor=#ffffff marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 onload='self.resizeTo((document.images[\"img1\"].width + 5),(document.images[\"img1\"].height+100))'>");
		viewWin.document.write("<CENTER><A href='javascript:self.close()' class='lnk'><IMG name=img1 src='" + picFileName + "' border=0></a><BR><A href='javascript:self.close()' class='lnk'><B>Inchide</B></A></CENTER>");
		viewWin.document.write("</BODY></HTML>");
		viewWin.document.close();
		viewWin.focus();
	}
}
// Trims the leading and trailing blanks from a given string:
function Trim(strToTrim) {
	while(strToTrim.charAt(0)==' '){strToTrim = strToTrim.substring(1,strToTrim.length);}
	while(strToTrim.charAt(strToTrim.length-1)==' '){strToTrim = strToTrim.substring(0,strToTrim.length-1);}
	return strToTrim;
}

// Validate an e-mail address:
function ValidateEmail(str){
	if (str.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) return true;
	else return false; 
}
// JavaScript Document
	startList = function() {
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {this.className+=" over";}
				node.onmouseout=function() {this.className=this.className.replace(" over", "");}
			}
		}
 	}
 }
function changeCountry1(){
var theForm = document.forms[4];
var intSelID = parseInt(new Number(theForm.area.options[theForm.area.selectedIndex].value));//areaID
for(var s=1;s<theForm.region.length;s++){
	theForm.region.options[s] = null;
	s--;
}
if (intSelID>0){
	eval("var selIDsArr = regionIDs_"+intSelID);
	eval("var selNamesArr = regionNames_"+intSelID);
	for (var j=1;j<selIDsArr.length+1;j++){
		var optRegion = new Option(selNamesArr[j-1],selIDsArr[j-1]);
		theForm.region.options[j]=optRegion;
	}
}
theForm.region.options[0].selected=true;
}
function changeCity1(){
var theForm = document.forms[4];
var intSelID = parseInt(new Number(theForm.region.options[theForm.region.selectedIndex].value));//regionid
for(var s=1;s<theForm.hood.length;s++){
	theForm.hood.options[s] = null;
	s--;
}
if (intSelID>0){
	eval("var selIDsArr1 = cityIDs_"+intSelID);
	eval("var selNamesArr1 = cityNames_"+intSelID);
	for (var j=1;j<selIDsArr1.length+1;j++){
		var optRegion = new Option(selNamesArr1[j-1],selIDsArr1[j-1]);
		theForm.hood.options[j]=optRegion;
	}
}
theForm.hood.options[0].selected=true;
}
function changeCcy(idx){
	document.forms[1].ccyidx.value=idx;
	document.forms[1].submit();
}
//-->
