function wopen(url, name, height, width, str1) {
       var str = "height=" + height + ",innerHeight=" + height;
       str += ",width=" + width + ",innerWidth=" + width;
	   
	   str += ", "+str1;
	   
	   
       if (window.screen) {
         var ah = screen.availHeight - 30;
         var aw = screen.availWidth - 10;

         var xc = (aw - width) / 2;
         var yc = (ah - height) / 2;

         str += ",left=" + xc + ",screenX=" + xc;
         str += ",top=" + yc + ",screenY=" + yc;
       }
       var win=window.open(url, name, str);
	   win.focus();
	   return win;
}	 

function switch_img(name)
{
document.all.image.innerHTML="<img src='./userdata/"+name+"'>";	
}

function swap_image(image_ptr,name)
{
image_ptr.src="./userdata/images/"+name;
}

function light_on(obj,color)
{
	obj.style.background=color;
	obj.style.cursor="hand";
}

function light_off(obj,color)
{
	obj.style.background=color;
	obj.style.cursor="";
}

function del_confirm (mylink, otherwise) /* confirm delete{{{*/
{
if(confirm("Skutočne chcete vyprázdniť košík?"))
   return true;
	
else
   {
   mylink.href=otherwise;
   return false;
}
}/*}}}*/

function price_calkulate(to, from)
 {
 var number = document.getElementById(from).value;
 if(from == 'price')
  {
  var result = number*30.126;
  }else{
  var result = number/30.126;
  }
  document.getElementById(to).value = Math.ceil(result);
 }
function select_item(item, stat)
 {
  if(document.getElementById(item).checked==true)
   {
    if(stat == "0")
     {
    document.getElementById(item).checked=false; 
     }
   }else{
    if(stat == "1")
     {
    document.getElementById(item).checked=true; 
     }
   }
 }

