function image_zoom(img_big, description)
{
	var temp = new Image();
	temp.src=img_big;
	var page = '<html>'+
					'<head></head>'+
						'<body bgcolor="#ffffff" rightmargin="5" leftmargin="5" bottommargin="5" topmargin="5">'+
						'<table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%">'+
						'<tr><td height="100%" align="center"><img align="middle" src="'+temp.src+'" border=0 onload="self.window.resizeTo((this.width+25),(this.height+110)); if(screen) self.window.moveTo( ((screen.width-this.width)/2), ((screen.height-this.height)/2));"></td></tr>'+
						'<tr><td align="center">'+description+'</td></tr>'+
					'</table></body>'+
				'</html>';
	var attribs = ',' + "menubar=0,location=0,toolbar=0,status=0,scrollbars=0,resizable=0, width=100,height=100";
	var wind = window.open('','_blank',attribs);
	wind.document.open();
	wind.document.write(page);
	wind.document.close();
}

Array.prototype.in_array = function(search_term) {
	var i = this.length;
	if (i > 0) {
		do {
			if (this[i] === search_term) {
				return true;
			}
		}
		while (i--);
	}
	return false;
}

Array.prototype.indexOf = function(obj){
	for(var i=0; i<this.length; i++){
		if(this[i]==obj){
			return i;
		}
	}
	return -1;
}

function validate_submit(f, fields, names)
{
	var errors = 0;
	var errors_fields = "";
	nodes = f.getElementsByTagName("input");
	for (var i = 0; i < nodes.length; i++)
		if ((fields.in_array(nodes[i].name)) && (nodes[i].value.length == 0))
		{
			errors++;
			errors_fields += names[fields.indexOf(nodes[i].name)] + ", ";
		}
	if (errors == 0)
		f.submit();
	else
	{
		var show = "Nu ati completat campu";
		if (errors == 1)
			show += "l: " + errors_fields.substr(0, errors_fields.length - 2) + ".";
		else
			show += "rile:\n" + errors_fields.substr(0, errors_fields.length - 2) + ".";
		alert(show);
	}
}

function bookmarksite(url, title)
{
	if (window.sidebar) // firefox
		window.sidebar.addPanel(title, url, "");
	else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	else if(document.all)// ie
		window.external.AddFavorite(url, title);
}