// JavaScript Document


function del_confirm(pagina, mesaj)
{
	mesaj="Esti sigur ca vrei sa "+mesaj;
	if (confirm(mesaj))
		location.href=pagina;
}

function toggle(id)
{
	obj=document.getElementById(id);
	if (obj.style.display=="none")
	{
		obj.style.display="block";
	}
	else
	{
		obj.style.display="none";
	}	
}

function js_confirm(go_link, lang, text)
{
	var c_text;
	if (lang=="ro")
	{
		c_text="Esti sigur ca vrei sa "+text+"?";
		if (confirm(c_text))
			document.location=go_link;
	}
	else if (lang=="en")
	{
		c_text="Are you sure you want to "+text+"?";
		if (confirm(c_text))
			document.location=go_link;
	}	
}

function popup(link_goto)
{
	var newWindow=window.open(link_goto, "_blank", "WIDTH=600, HEIGHT=600, SCROLLBARS");
}

function picOpen(pic,width,height,description)
{
	var l,t,w,h;
	w = (width>(screen.availWidth-10))?(screen.availWidth-10):width;
	h = (height>(screen.availHeight-30))?(screen.availHeight-30):height;
	l = (width>(screen.availWidth-10))?0:((screen.availWidth - 10 - w)/2);
	t = (height>(screen.availHeight-30))?0:((screen.availHeight - 30 - h)/2);
	if(height+16>(screen.availHeight-30) && (width+16)<=(screen.availWidth-10)) w += 16;
	if(width+16>(screen.availWidth-10) && (height+16)<=(screen.availHeight-30)) h += 16;
	str_buffer = '<html>      \
									<head>    \
										<title>Orient Ceramic : ' + description + '</title>    \
										<link rel="stylesheet" type="text/css" href="style.css">  \
									</head>         \
									<body style="margin: 0px;">     \
									<div align="center" style="width: ' + w + '; height: ' + h + '; overflow: auto; padding: 0px;">   \
									<a href="javascript: window.close();"><img src="' + pic + '" alt="' + pic + '" border="0"></a></div>               \
									</body>              \
								</html>                \
							 ';
	var picWin = window.open("","bigpic","statusbar=no, toolbar=no, menubar=no, directories=no, scrollbars=no, resizable=no, top=" + t + ", left=" + l + ", width=" + w + ", height=" + h);
	var pic_doc = picWin.document;
	pic_doc.write (str_buffer);
	pic_doc.close();
}