function openwin(url,name) {
  var height = 600;
  var width = 800;
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;
    var xc = Math.floor((aw - width) / 2);
    var yc = Math.floor((ah - height) / 2);
    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  str += ",directories=0,location=0,menubar=1,personalbar=1,scrollbars=1,status=1,toolbar=1,resizable=1";
  //return window.open(url,name,str);
  window.open(url,name,str);
  return false;
}

var IE= null;
var ua = navigator.appName.toLowerCase();
if(ua.indexOf('explorer')>-1 ) {IE=true;}
var objItem; 
var oClientX = 0;
var oClientY = 0;
//--------------------------------------

function Pozice_Basket(strText,oX,oY){
        document.getElementById('basket_popup2').innerHTML=strText;
        document.getElementById('basket_popup3').innerHTML="  připojování ke košíku...";
        var x = oX;
        if (IE){
                var e = event.srcElement;
                var y = 0;
                while (typeof e == 'object' && e.tagName != 'BODY'){
                        y += e.offsetTop;
                        e = e.offsetParent;
                };
        }else{

                var y = oY + document.documentElement.scrollTop + 50;
        }
        x = (x+20).toString() + "px"
        y = (y-140).toString() + "px"
        document.getElementById('basket_popup1').style.top = y;
		document.getElementById('basket_popup1').style.left = x;
}




function zkontroluj_email(adresa) {
  re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$/;
  return adresa.search(re) == 0;
}

function Form_Validatore(theForm) {// vsechny udaje 
	
	if (!zkontroluj_email(theForm.textfield2.value)) {
  		theForm.textfield2.style.backgroundColor = "#FFD1D1";
			alert("Nevyplnily jste správně svůj kontaktní e-mail");
			theForm.textfield2.focus();
			return (false);
		}
		
	return (true);
}

