function mouseOn(row){  row.style.backgroundColor = '#FBE6E6';}function mouseOut(row){  row.style.backgroundColor = '';}function ref(reference){  parent.location.href = reference;}function infoAlert(info1, info2){  alert(info1+"\n"+info2);}function showDelete(id){  var newSS = document.styleSheets[0];  document.getElementById('delete_file'+id).value = '1';  createRule(newSS, '#span_file'+id, 'display: inline;');}function dialog(what, reference) {  if (confirm("Opravdu chcete "+what+"?") == true)    window.location = reference;   else    return 0;}function blinkIt(){ if (!document.all) return; else {   for(i=0;i<document.all.tags('blink').length;i++)   {      s=document.all.tags('blink')[i];      s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';   } }}function uncheckAll(theElement){  var theForm = theElement.form, z = 0;	for(z=0; z<theForm.length; z++)	{    if(theForm[z].type == 'checkbox')      theForm[z].checked = theElement.checked;  }}function numbersOnly(myfield, e, dec){  var key;  var keychar;    if (window.event)     key = window.event.keyCode;  else if (e)     key = e.which;  else     return true;  keychar = String.fromCharCode(key);    // control keys  if ((key==null) || (key==0) || (key==8) ||       (key==9) || (key==13) || (key==27) )     return true;    // numbers  else if ((("0123456789").indexOf(keychar) > -1))     return true;    // decimal point jump  else if (dec && (keychar == "."))     {     myfield.form.elements[dec].focus();     return false;     }  else     return false;}function changeBookmark(id){  var newSS = document.styleSheets[0];  if (id==1)  {    createRule(newSS, '#bookmark_on1', 'display: block;');    createRule(newSS, '#bookmark_off1', 'display: none;');    createRule(newSS, '#bookmark_text1', 'display: block;');    createRule(newSS, '#bookmark_on2', 'display: none;');    createRule(newSS, '#bookmark_off2', 'display: block;');    createRule(newSS, '#bookmark_text2', 'display: none;');    createRule(newSS, '#bookmark_on3', 'display: none;');    createRule(newSS, '#bookmark_off3', 'display: block;');    createRule(newSS, '#bookmark_text3', 'display: none;');  }  else if (id==2)  {    createRule(newSS, '#bookmark_on2', 'display: block;');    createRule(newSS, '#bookmark_off2', 'display: none;');    createRule(newSS, '#bookmark_text2', 'display: block;');    createRule(newSS, '#bookmark_on1', 'display: none;');    createRule(newSS, '#bookmark_off1', 'display: block;');    createRule(newSS, '#bookmark_text1', 'display: none;');    createRule(newSS, '#bookmark_on3', 'display: none;');    createRule(newSS, '#bookmark_off3', 'display: block;');    createRule(newSS, '#bookmark_text3', 'display: none;');  }    else if (id==3)  {    createRule(newSS, '#bookmark_on3', 'display: block;');    createRule(newSS, '#bookmark_off3', 'display: none;');    createRule(newSS, '#bookmark_text3', 'display: block;');    createRule(newSS, '#bookmark_on1', 'display: none;');    createRule(newSS, '#bookmark_off1', 'display: block;');    createRule(newSS, '#bookmark_text1', 'display: none;');    createRule(newSS, '#bookmark_on2', 'display: none;');    createRule(newSS, '#bookmark_off2', 'display: block;');    createRule(newSS, '#bookmark_text2', 'display: none;');  }  }function stockChange(id){  var newSS = document.styleSheets[0];  var stock_actual_1  = readCookie("stock_actual_1");  var stock_actual_2  = readCookie("stock_actual_2");  var stock_actual_3  = readCookie("stock_actual_3");    if (!stock_actual_1) stock_actual_1 = '';  if (!stock_actual_2) stock_actual_2 = '';  if (!stock_actual_3) stock_actual_3 = '';  if (id)  {    if (stock_actual_3)      var stock_actual = stock_actual_1+stock_actual_2+stock_actual_3;    else if (stock_actual_2)      var stock_actual = stock_actual_1+stock_actual_2;        else if (stock_actual_1)      var stock_actual = stock_actual_1;        createRule(newSS, '.connect_'+stock_actual, 'display: none;');           var connect_this = document.getElementById('select_'+id).value;    connect_this = '-'+connect_this;        if (id==1)      var connect = connect_this+stock_actual_2+stock_actual_3;    if (id==2)      var connect = stock_actual_1+connect_this+stock_actual_3;    if (id==3)      var connect = stock_actual_1+stock_actual_2+connect_this;        createRule(newSS, '.connect_'+connect, 'display: inline;');        createCookie('stock_actual_'+id, connect_this, 365);  }  else  {    if (stock_actual_3)      createRule(newSS, '.connect_'+stock_actual_1+stock_actual_2+stock_actual_3, 'display: inline;');    else if (stock_actual_2)      createRule(newSS, '.connect_'+stock_actual_1+stock_actual_2, 'display: inline;');        else if (stock_actual_1)      createRule(newSS, '.connect_'+stock_actual_1, 'display: inline;');  }}function stockHide(connect){  var newSS = document.styleSheets[0];    createRule(newSS, '.connect_'+connect, 'display: none;');}function stockInit(id, connect){  createCookie('stock_actual_'+id, connect, 365);}function stockReset(){  createCookie('stock_actual_1', '', 365);  createCookie('stock_actual_2', '', 365);  createCookie('stock_actual_3', '', 365);}function show_variant(id){  var newSS = document.styleSheets[0];  var check = document.getElementById('check_'+id).checked;  if (check == true)    createRule(newSS, '.var_'+id, 'display: inline;');  else    createRule(newSS, '.var_'+id, 'display: none;');}function hide_variant(id){  var newSS = document.styleSheets[0];    createRule(newSS, '.var_'+id, 'display: none;');}function createRule(stylesheet, selektor, deklarace){  if (stylesheet.cssRules)  {    var rules = stylesheet.cssRules;  } else if (stylesheet.rules)  {    var rules = stylesheet.rules;  }    var index = rules.length;    if (stylesheet.insertRule)  {    var ruleText = selektor+'{'+deklarace+'}';    stylesheet.insertRule(ruleText, index);  } else if (stylesheet.addRule)  {    stylesheet.addRule(selektor, deklarace, index);  }}	function newRule(id){  var newSS = document.styleSheets[0];    if (id == "10")  {    createRule(newSS, '.deliver', 'display: none;');    createCookie("deliver_cookie", id, 365);  }  if (id == "11")  {    createRule(newSS, '.deliver', 'display: block;');    createCookie("deliver_cookie", id, 365);  }      if (id == "20")  {    createRule(newSS, '.invoice', 'display: none;');      createCookie("invoice_cookie", id, 365);  }   if (id == "21")  {    createRule(newSS, '.invoice', 'display: block;');      createCookie("invoice_cookie", id, 365);  } }function navigator_order(){  var aaa = document.getElementById('order').value;  location.href = aaa;}function navigator_products(){  var aaa = document.getElementById('products').value;  location.href = aaa;}function navigator_serie(){  var aaa = document.getElementById('serie').value;  location.href = aaa;}function navigator_dir(){  var aaa = document.getElementById('dir').value;  location.href = aaa;}function navigator_price(){  var aaa = document.getElementById('price').value;  location.href = aaa;}function navigator_medium(){  var aaa = document.getElementById('medium').value;  location.href = aaa;}function navigator_duration(){  var aaa = document.getElementById('duration').value;  location.href = aaa;}function locationToID(where, direct){  if (direct)    location.href = where;  else  {    var aaa = document.getElementById(where).value;    location.href = aaa;  }}function createCookie(name,value,days) {  if (days) {    var date = new Date();    date.setTime(date.getTime()+(days*24*60*60*1000));    var expires = "; expires="+date.toGMTString();  }  else expires = "";  document.cookie = name+"="+value+expires+"; path=/";}function readCookie(name) {  var nameEQ = name + "=";  var ca = document.cookie.split(';');  for(var i=0;i < ca.length;i++) {    var c = ca[i];    while (c.charAt(0)==' ') c = c.substring(1,c.length);    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);  }  return null;}function openNewWindow(reference){  window.open(reference, '');}function NetShops(){  url = 'http://www.netshops.cz/';  window.open(url, '');}function openPhoto(server, id){  iMyWidth = (window.screen.width/2) - (400 + 10)  iMyHeight = (window.screen.height/2) - (300 + 25)  Fokus = window.open(server+"/photo.php?id="+id, "","height=600,width=800,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");  Fokus.focus()}function eraseText(what){  string = document.getElementById(what).value;  first = string.substr(0,1);  sixth = string.substr(5,1);  if ((first==' ') || (sixth=='X'))    document.getElementById(what).value = '';}function checkBox(id, what){  var checkbox = document.getElementById(what+id);    if (checkbox.checked == true)    checkbox.checked = false;  else    checkbox.checked = true;}rating = {		imgOff : "/_img/star_off.gif",	imgOn : "/_img/star_on.gif",		highlight : function (n) {		n = ((n >= 0) && (n <= 5)) ? n : 0;		for (var i = 1; i <= 5; i++) {			var elm = document.getElementById("rating" + i);			if (elm) {				elm.src = (n <= i-1) ? rating.imgOff : rating.imgOn;			}		}	}}var deliver_cookie = readCookie("deliver_cookie");newRule(deliver_cookie);var invoice_cookie = readCookie("invoice_cookie");newRule(invoice_cookie);
