// JavaScript Document

var catL1no=0;
function setFrameSrc(url)
 {
  document.getElementById('loadFrame').src=url;
 }

var newwindow = '';

function addToCart(id)
 {
  /*var url='cart/changeCart.php?id='+id+'&quantity=1';
  setFrameSrc(url); */
  alert("Produsele HARD IT nu pot fi comandate momentan! Ne cerem scuze!")
 }

function openPopUp(url,width,height)
 {
  if ((!newwindow.closed) && newwindow.location) newwindow.location.href = url;
   else
	{
	 newwindow=window.open(url,'name','height='+height+',width='+width+',status=no,scrollbars=yes');
	 if (!newwindow.opener) newwindow.opener = self;
	}
   if (window.focus) {newwindow.focus()}
   if (newwindow.name==null) alert('Popup blocker pornit! Nu putem deschide pagina.');
   return false;
 }

function getElementTop(Elem) {
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all) {
			var elem = document.all[Elem];
		}
		yPos = elem.offsetTop;
		tempEl = elem.offsetParent;
		while (tempEl != null) {
  			yPos += tempEl.offsetTop;
	  		tempEl = tempEl.offsetParent;
  		}
		return yPos;
}

function expandCat(sect)
{
	for (i=0;i<catL1no;i++)
		{
			sid=document.getElementById("subcategories"+i);
			if (sid)
				{
					sid.style.display="none";
					iid=document.getElementById("img"+i);
					iid.src="/skin/Devilish/images/plusy.gif";
				}
		}
	sid = document.getElementById("subcategories"+sect);
	if (sid)
		{
			sid.style.display="block";
			iid=document.getElementById("img"+sect);
			iid.src="/skin/Devilish/images/minusy.gif";
		}
	return false;
}

