function blocks(){
}
var MyCookie = {
    Write:function(name,id,days) {
        var path = "/";
        var D = new Date();
        value = encodeURIComponent(id);
        value+='; path='+path;
        D.setTime(D.getTime()+86400000*days)
        document.cookie = escape(name)+"="+value+
            ((days == null)?"":(";expires="+D.toGMTString()));
        return (this.Read(name) == value);
    },
    Read:function(name) {
        var EN=escape(name)
        var F=' '+document.cookie+';', S=F.indexOf(' '+EN);
        return S==-1 ? null : unescape(     F.substring(EN=S+EN.length+2,F.indexOf(';',EN))    );
    }
} 
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
function popupWindowPrice(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=400,screenX=150,screenY=150,top=150,left=150')
}
function load_actprds (){
new Ajax.Updater(
	   		'actprdcts',
	   		'/index.php?main_page=products_in_action&qc=1',
	   		{method:'get',
	   		onLoading: function() {
				$('actprdcts').innerHTML = '<div style="margin-left:auto;margin-right:auto;width:60px;margin-top:50px;"><img src="../images/ajax-loader1.gif" width="32" height="32" alt="Načítavam...počkajte prosím" /><\/div>';
			   }
         });
}
function shipping_info() {
window.open("/index.php?main_page=shipping_info&qc=1","new","toolbar=no, location=no, directories=no, status=yes, menubar=no,"+
  "scrollbars=yes, resizable=yes, copyhistory=no, width=500, height=170,"+
  "top=120, left=300");
}            
function click_on_gallery(){
document.getElementById('content2').onclick();
}
function load_views (){
    document.getElementById('sells').style.display = "none";
		document.getElementById('views').style.display = "";	
    document.getElementById('views-head').className = "views-active";
    document.getElementById('sells-head').className = "sells";
}
function load_sells (){
    document.getElementById('sells').style.display = "";
		document.getElementById('views').style.display = "none";	
    document.getElementById('views-head').className = "views";
    document.getElementById('sells-head').className = "sells-active";
}
function rowOverEffectTop(object) {
  object.style.backgroundColor = '#d9d9d9';
}
function rowOutEffectTop(object) {
  if(object.getAttribute("rel")=="open"){
  
  }else{
  object.style.backgroundColor = '#F2F2F2';
       }
}
function rowOverEffect(object) {
  object.style.backgroundColor = '#d9d9d9';
}
function rowOutEffect(object) {
  if(object.getAttribute("rel")=="open"){
  
  }else{
  object.style.backgroundColor = '#ffffff';
       }
}
function Ovt(object) {
  object.style.backgroundColor = '#d9d9d9';
}
function Out(object) {
  if(object.getAttribute("rel")=="open"){
  
  }else{
  object.style.backgroundColor = '#F2F2F2';
       }
}
function Ov(object) {
  object.style.backgroundColor = '#d9d9d9';
}
function Ou(object) {
  if(object.getAttribute("rel")=="open"){
  
  }else{
  object.style.backgroundColor = '#ffffff';
       }
}
function winW() {
if (window.innerWidth) return (window.innerWidth-385)/2;
else if (document.documentElement && document.documentElement.clientWidth)
return (document.documentElement.clientWidth-385)/2;
else if (document.body && document.body.clientWidth)
return (document.body.clientWidth-385)/2;
else return null;
} 
function scrolldiv2(order) {
  document.getElementById("container").scrollLeft = order - winW();
}
function navi_build() {  // treemenuuID, ul ID, li ID to mark
  var tree_id = document.getElementById('navi_group').value;
  var ul_id = document.getElementById('navi_parent').value;
  var li_id = document.getElementById('navi_current').value;

  ddtreemenu.closefolder="images/plus.png"
  ddtreemenu.openfolder="images/minus.png"
  ddtreemenu.flatten('treemenu1','contact');
  ddtreemenu.flatten('treemenu2','contact');
  ddtreemenu.flatten('treemenu3','contact');

  if(ul_id >0){
  var rootnode=document.getElementById("treemenu"+tree_id)
  var currentnode=document.getElementById("c-"+ul_id)
  currentnode.style.display="block"
  currentnode.parentNode.style.backgroundImage="url("+ddtreemenu.openfolder+")"
  while (currentnode!=rootnode){
  if (currentnode.tagName=="UL"){ //if parent node is a UL, expand it too
  currentnode.style.display="block"
  currentnode.setAttribute("rel", "open") //indicate it's open
  currentnode.parentNode.style.backgroundImage="url("+ddtreemenu.openfolder+")"
  }
  currentnode=currentnode.parentNode
  } 
  }else{
  var currentnode=document.getElementById("c-"+li_id)
  if(currentnode == null){
  }else{
  currentnode.style.display="block"
  currentnode.parentNode.style.backgroundImage="url("+ddtreemenu.openfolder+")"
       }
  }
  document.getElementById("li-"+li_id).style.backgroundColor = '#d9d9d9';
  document.getElementById("li-"+li_id).setAttribute("rel", "open");
}
function changeSF(what) {
  //if (document.getElementById(what).style.display == "none"){
  var sf = what;
  if (sf == 'sukromna'){
     document.getElementById('firma').style.display = "none";
     document.getElementById('sukromna').style.display = "";
  }else{
      document.getElementById('firma').style.display = "";
      document.getElementById('sukromna').style.display = "none";
  }
}
function winWresize() {
      if (window.innerWidth) return window.innerWidth;
      else if (document.documentElement && document.documentElement.clientWidth)
      return document.documentElement.clientWidth;
      else if (document.body && document.body.clientWidth)
      return document.body.clientWidth;
      else return null;
      }
      function winHresize() {
      if (window.innerHeight) return window.innerHeight;
      else if (document.documentElement && document.documentElement.clientHeight)
      return document.documentElement.clientHeight;
      else if (document.body && document.body.clientHeight)
      return document.body.clientHeight;
      else return null;
      }
