function ChangePic(myimg, WhichSelect){
  var uagent = window.navigator.userAgent.toLowerCase();
  var ffb =(uagent.indexOf('gecko') != -1)?true:false; //firefox | gecko
  var id;
  if (!ffb) {//expolrer
	  var Childer = WhichSelect.children.length
	  for(i=0; i < Childer; i++) {
	   if (WhichSelect.children[i].selected) {
		 aNode = WhichSelect.children[i].cloneNode(true)
		 id = aNode.value;
		 break
	   }
	  }
	  //alert('id cat.' + id)
  } else {
  	id = WhichSelect.value;
  }
  ob = eval("this.document." + myimg)
  //ob.src = "http://www.snowboard-zezula.cz/php/dbFile.php?dbFile_id=product-" + id + "-main";
  ob.src = "http://admin.snowboard-zezula.cz/admin/vec/filethmb.php?thmbman[path]=gstock/" + id + "&thmbman[file]=1.jpg&thmbman[newwidth]=250&thmbman[newheight]=250";
  document.getElementById('detailphoto').setAttribute('href','http://admin.snowboard-zezula.cz/admin/vec/filethmb.php?thmbman[path]=gstock/' + id + '&thmbman[file]=1.jpg&thmbman[newwidth]=400&thmbman[newheight]=400')
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function ChangeAddImage(myimg, idpoh, num) {
  ob = eval("this.document." + myimg)
  ob.src = "http://admin.snowboard-zezula.cz/admin/vec/filethmb.php?thmbman[path]=gstockobrazky/" + idpoh + "&thmbman[file]=" + num + ".jpg&thmbman[newwidth]=250&thmbman[newheight]=250";

 //document.links['detailphoto'].href = ('http://admin.snowboard-zezula.cz/admin/vec/filethmb.php?thmbman[path]=gstockobrazky/' + idpoh + '&thmbman[file]=' + num + '.jpg&thmbman[newwidth]=400&thmbman[newheight]=400')
 document.getElementById('detailphoto').setAttribute('href','http://admin.snowboard-zezula.cz/admin/vec/filethmb.php?thmbman[path]=gstockobrazky/' + idpoh + '&thmbman[file]=' + num + '.jpg&thmbman[newwidth]=400&thmbman[newheight]=400')
 //http://admin.snowboard-zezula.cz/admin/vec/filethmb.php?thmbman[path]=gstock/<?php echo $product_stock_id_poh;?>&thmbman[file]=1.jpg&thmbman[newwidth]=400&thmbman[newheight]=400
  //ob.src = "http://admin.snowboard-zezula.cz/admin/vec/upload/gstockobrazky/" + idpoh + "/" + num + ".jpg";
}

function DeliveryToCart(deliveryMSG, priceALL) {
	document.getElementById('post_price').innerHTML = deliveryMSG;
	document.getElementById('all_price').innerHTML = priceALL;
}
