function selMenu(sel, targetstr)
{
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') 
  {
     if (targetstr == 'blank') 
	 {
       window.open(sel.options[index].value, 'win1');
     } 
	 else 
	 {
       var frameobj;
       if (targetstr == '') 
		 targetstr = 'self';
       if ((frameobj = eval(targetstr)) != null)
         frameobj.location = sel.options[index].value;
     }
  }
}
var map = null;
function GetMap()
{
	map = new VEMap('myMap');
	map.LoadMap(new VELatLong(45.774540000000000, 21.24154000000000), 16, VEMapStyle.Road, false, VEMapMode.Mode2D, true, 0);
	map.SetScaleBarDistanceUnit(VEDistanceUnit.Kilometers);
	pinshoplayer = new VEShapeLayer();
	map.AddShapeLayer(pinshoplayer);
	pinshopshape = new VEShape(VEShapeType.Pushpin, new VELatLong(45.774540000000000, 21.24154000000000));
	pinshopshape.SetTitle("MY PC");
	pinshopshape.SetDescription("Str. Sfin\u021Bii Apostoli Petru \u0219i Pavel, Nr. 39<br />Timi\u0219oara");
	pinshopshape.SetCustomIcon('<div><img src="img/sigla-harta.png" alt="MY PC Calculatoare Timisoara" width="66" height="20" border="0" /><\/div>');
	pinshopshape.SetAltitude(0, VEAltitudeMode.RelativeToGround);
	pinshoplayer.AddShape(pinshopshape);
}
user = 'office';
site = 'mypctm.ro';
function email()
{
	document.write('<a href=\"mailto:' + user + '@' + site + '\" style="color:#06F; font-weight:bold;">');
	document.write(user + '@' + site + '</a>');
}
var codProdus;
function galeriePoze(codProdus)
{
    var centerWidth = (window.screen.width - 640) / 2;
    var centerHeight = (window.screen.height - 640) / 2;
    newWindow = window.open('galerie-poze.php?cod-produs=' + codProdus, 'Galerie', 'resizable=0,width=640,height=640,left=' + centerWidth + ',top=' + centerHeight);
    newWindow.focus();
    return;
}
function close_craciun()
{
	document.getElementById('craciun').style.visibility = "hidden";
}
var nr_producatori;
var categorie_produs;
var i;
var url = "";
function ad_producator(categorie_produs,nr_producatori)
{
	for(i=1;i<=nr_producatori;i++)
	{
		if(document.getElementById('chkProducator'+i).checked == "1")
		{
			if(url != "")
				url = url + "," + document.getElementById('chkProducator'+i).value;
			else
				url = url + document.getElementById('chkProducator'+i).value;
		}
	}
	if(url != "")
		window.open('produse.php?categorie_produs=' + categorie_produs + '&producator=' + url,'_self');
	else
		window.open('produse.php?categorie_produs=' + categorie_produs,'_self');
}
var string_cautare;
function cautare()
{
	if(document.getElementById('txtCautare').value != "")
	{
		if(document.getElementById('txtCautare').value.length > 2)
		{
			string_cautare = document.getElementById('txtCautare').value;
			window.open('produse.php?cautare=' + string_cautare,'_self');
		}
	}
}
