/** TabParams
 * eventType		- What action activates a tab? "click" | "mouseover" 
 *                       | "mousedown" | "mouseup" .
 *
 * tabTagName	   - "span" | "img" | "*" -- span or img speeds up initialization.
 *                    use "*" if your have both span and img tabs.
 * imgOverExt	   - A file name suffix before the extension .
 *                    if src="calendar.gif" is the normal file and you want it to 
 *                    be "calendaro.gif" on mouseover, then imgOverExt is "o".
 *
 * imgActiveExt	   - A file name suffix before the extension .
 *                    if src="calendaro.gif" is the normal file and you want it to 
 *                    be "calendaro.gif" on mouseover, then imgOverExt is "o".
 *
 * cookieScope		- "page" | "site" | "none" 
 *                     -- "page" 
 *                         page scope (default) saves multiple tab states for different 
 *                         tabsystems on your site. 
 *                         Page scope is useful when you want to save the state of
 *                         different tabsystems on your site. Page scope uses multiple 
 *                         cookies.
 *
 *                    -- "site"
 *                        site scope saves the state for tabSystems that
 *                        may be used on multiple pages (such as with included files.
 *                        This is most useful for using the same tabSystem(s) on 
 *                        different pages, as with a server side include file. Site scope 
 *                        uses only 1 cookie.
 *
 *                    -- "none"
 *                        No cookie will be used.
 */
 	TabParams = {
		eventType       : "click",
		tabTagName      : "a",
		imgOverExt      : "o",
		imgActiveExt    : "a",
		cookieScope		: "site"
	};

function windowLoaded() {
	
	try {	
		tabInit();
		var ts = TabSystem.list["TabSystem2"];
	}
	catch (error) {}
		
}

function ukazatelTabuF(a) { //nastavi hodnotu list
 
	document.forms.form['f[list_f]'].value = a; 
	//alert(document.forms.form['f[list_f]'].value);
	
}

function switchTabStyle(a) { // pseudo funkce pro prepinani talozek ve formech - v boxicich to resi tabs.js
	
	var tabik = new Array ("-","a","b","c","d","e");
	var stran = new Array (2,5);	//2 x 4 strany
	
	kolik = (typeof kolik == 'undefined') ? 5 : kolik;

	try {
	//kolik = 5;
	
	for(i=1;i<=kolik;i++) {
		
	document.getElementById('ttab'+tabik[i]).className = "tab";
		
		}
	
	document.getElementById('ttab'+tabik[a]).className = "tab tabActive";
	
	} catch (error) {}
	
	
	}

function switchTabBackgr(tab,val) {
	
	
	if (document.getElementById(tab).className != "tab tabActive")
	{
		
	if (val == "over") { 	
	document.getElementById(tab).className = "tab tabHover";
	
	} else {
		
	document.getElementById(tab).className = "tab";	
		}
	
	}
	
}	

function getTab() {

try {

switch (document.forms.form['f[list_f]'].value)
	{
		/*
		case "":
			document.getElementById('ttaba').className = "tab tabActive";
			document.getElementById('ttabb').className = "tab";
			document.getElementById('ttabc').className = "tab";
			document.getElementById('ttabd').className = "tab";		
		break;
		case "1":
			document.getElementById('ttaba').className = "tab";
			document.getElementById('ttabb').className = "tab tabActive";
			document.getElementById('ttabc').className = "tab";
			document.getElementById('ttabd').className = "tab";	
		break;
		case "2":
			document.getElementById('ttaba').className = "tab";
			document.getElementById('ttabb').className = "tab";
			document.getElementById('ttabc').className = "tab tabActive";
			document.getElementById('ttabd').className = "tab";	
		break;
		case "3":
			document.getElementById('ttaba').className = "tab";
			document.getElementById('ttabb').className = "tab";
			document.getElementById('ttabc').className = "tab";
			document.getElementById('ttabd').className = "tab tabActive";	
		break;
		case "4":
			document.getElementById('ttaba').className = "tab";
			document.getElementById('ttabb').className = "tab";
			document.getElementById('ttabc').className = "tab";
			document.getElementById('ttabd').className = "tab tabActive";	
		break;
		*/
	}
	
} catch (error) {}	

}

function hidePartner() {
//alert("a");
try {
	if (document.forms.form['f[d_sitfam]'].value == "C" || document.forms.form['f[d_sitfam]'].value == "D" || document.forms.form['f[d_sitfam]'].value == "V" || document.forms.form['f[d_sitfam]'].value == "") {
		for(it=1;it<=par_col;it++) {
			document.getElementById('d_sitfam_' + it).style.display = "none";
			//alert(document.getElementById('d_sitfam_' + it).style.display);
		}
		document.getElementById('frm-2str').className = " ";
		document.getElementById('d_sitfam_1').className = "thin-bottom-border";
	} else {
		for(it=1;it<=par_col;it++) {
			document.getElementById('d_sitfam_' + it).style.display = (par_col == 13) ? "" : "block";
			//alert(document.getElementById('d_sitfam_' + it).style.display);
		}
		document.getElementById('frm-2str').className = "thin-bottom-border";
		document.getElementById('d_sitfam_1').className = " ";
	} 
} catch (error) {}
}

function showBlokBanka() {
	if (document.getElementById('banka_ne')) {
		//alert(document.forms.formular['Z_FORM[d_ucetano]'].value);
		document.getElementById('banka_ne').style.display = (document.forms.form['f[d_ucetano]'].value) ? "block" : "none";
		}
		document.forms.form['f[d_modepaie]'].value = document.forms.form['f[d_ucetano]'].value ? "B" : "M"; //B - ucet, M - slozenka
		document.forms.form['f[d_modfin]'].value = document.forms.form['f[d_ucetano]'].value ? "1" : "O"; 
		if (document.forms.form['f[d_ucetano]'].value != 1) { //vymazani polozek pro ucet - ne
				document.forms.form['f[d_ucetod]'].value="";
				document.forms.form['f[d_banka]'].value="";
				document.forms.form['f[d_ucet1]'].value="";
				document.forms.form['f[d_ucet2]'].value="";
				document.getElementById('dbanka').className = " ";
		} else {
				document.getElementById('dbanka').className = "thin-bottom-border";
		}	
	}
 

function resetPosition() {
	document.getElementById('ttaba').className = "tab tabActive";
	document.getElementById('ttabb').className = "tab";
	document.getElementById('ttabc').className = "tab";
	document.getElementById('ttabd').className = "tab";
	switchTabs('taba',event,false);
}

var resetPosition = 1;

function resetPosition5() {
	//alert(resetPosition);
	
	/*document.getElementById('ttaba').className = "tab tabActive";
	document.getElementById('ttabb').className = "tab";
	document.getElementById('ttabc').className = "tab";
	document.getElementById('ttabd').className = "tab";
	document.getElementById('ttabe').className = "tab";
	*/
	if (resetPosition == 1) {
		switchTabStyle(1);
		switchTabs('taba');
	}
}

function showOp() {
	
try {

if (!document.getElementById('form1')) {
		
		document.getElementById('form1').style.display='none';
		}

	if (document.getElementById('form1')) {
		
		document.getElementById('form1').style.display='block';

		
		}
} catch (error) {}	
	
}		

	
function changeButton() {
   if (on) 
  {
      
    if (document.getElementById('btn-prepocitat')) {
			 document.getElementById('btn-prepocitat').className = "link-red-blink";
		}
		
     if (document.getElementById('btn-prepocitat-credial')) /*document.getElementById('btn-prepocitat-credial').style.backgroundColor="#405280" */ document.getElementById('btn-prepocitat-credial').src = "../images/credial/btn_prepocitat_2.gif";
     
     if (document.getElementById('btn-prepocitat-cweb')) document.getElementById('btn-prepocitat-cweb').src = "../images/cweb/button_count2.gif";
     if (document.getElementById('btn-prepocitat-obchodni-dum')) document.getElementById('btn-prepocitat').style.backgroundColor="#99AECD";
     if (document.getElementById('btn-prepocitat-eva')) document.getElementById('btn-prepocitat').style.backgroundColor="#F0F0F0";
     if (document.getElementById('btn-prepocitat-expertcr')) document.getElementById('btn-prepocitat').style.backgroundColor="#FFFFFF";
     if (document.getElementById('btn-prepocitat-kasa')) document.getElementById('btn-prepocitat').style.backgroundColor="#F0F0F0";
     if (document.getElementById('btn-prepocitat-alza')) document.getElementById('btn-prepocitat').style.backgroundColor="#F0F0F0";
     if (document.getElementById('btn-prepocitat-mall')) document.getElementById('btn-prepocitat').style.backgroundColor="#C33B27";
     
    }
   else {
   	 
     
     //if (document.getElementById('btn-prepocitat')) document.getElementById('btn-prepocitat').style.backgroundColor="#DF2626";
    if (document.getElementById('btn-prepocitat')) {
     	document.getElementById('btn-prepocitat').className = "link-red-hover";
    }
    	 
     if (document.getElementById('btn-prepocitat-credial')) /*document.getElementById('btn-prepocitat-credial').style.backgroundColor="#df2626"*/ document.getElementById('btn-prepocitat-credial').src = "../images/credial/btn_prepocitat.gif";
     
     if (document.getElementById('btn-prepocitat-cweb')) document.getElementById('btn-prepocitat-cweb').src = "../images/cweb/button_count.jpg";
     if (document.getElementById('btn-prepocitat-obchodni-dum')) document.getElementById('btn-prepocitat').style.backgroundColor="#BB3333";
     if (document.getElementById('btn-prepocitat-eva')) document.getElementById('btn-prepocitat').style.backgroundColor="#D4D0C8";
     if (document.getElementById('btn-prepocitat-expertcr')) document.getElementById('btn-prepocitat').style.backgroundColor="#E9EEF9";
     if (document.getElementById('btn-prepocitat-kasa')) document.getElementById('btn-prepocitat').style.backgroundColor="#D4D0C8";
     if (document.getElementById('btn-prepocitat-alza')) document.getElementById('btn-prepocitat').style.backgroundColor="#D4D0C8";
     if (document.getElementById('btn-prepocitat-mall')) document.getElementById('btn-prepocitat').style.backgroundColor="#909EAF";
     
    }
   on=!on; 
   return true; 
} 

function changeButtonProceed() {
	if (onP) {
  	  if (document.getElementById('btn-proceed')) {
			 document.getElementById('btn-proceed').className = "link-red-blink";
			}
  } else {
   	 
    if (document.getElementById('btn-proceed')) {
     	document.getElementById('btn-proceed').className = "link-red-hover";
    }
     
    }
   onP=!onP; 
   return true; 
} 
	
var isBlinking = false;
var isBlinkingProceed = false;
var blinker;
var blinkerProceed;

function startblink() {
	if (isBlinkingProceed) {
		stopblinkProceed();
	}
	if (!isBlinking) {
   blinker = setInterval("changeButton()", 1000); 
   on=true; 
  	isBlinking = true;
  }
} 

function startblinkProceed() {
	if (!isBlinkingProceed) {
   blinkerProceed = setInterval("changeButtonProceed()", 1000); 
   onP=true; 
  	isBlinkingProceed = true;
  }
} 

function stopblink() { 
	isBlinking = false;
	on = false;
	changeButton();
  clearInterval(blinker); 
} 

function stopblinkProceed() { 
	isBlinkingProceed = false;
	onP = false;
	changeButtonProceed();
  clearInterval(blinkerProceed); 
} 

function showTyp() {
	try {
	if (document.forms.form['f[d_typ_pom]'].value == 0) {

			document.getElementById('delka').style.display = "inline";
			document.getElementById('splatka').style.display = "none";

	} else {
			document.getElementById('delka').style.display = "none";
			document.getElementById('splatka').style.display = "inline";
	} 
} catch (error) {}
	
	
	}

function showSim() {
	try {
	if (document.forms.form['prepocitano'].value==1) {
		document.getElementById('d_simulace').style.display = "";
		document.getElementById('d_simulace').className = "";
		document.getElementById('d_simulace_0').className = "thin-bottom-border";	
		document.getElementById('op_extended').style.display = "block";	
		document.getElementById('od_next').style.display = "block";
		document.getElementById('btn-calculate').innerHTML = "přepočítat";
		}
	else {
		document.getElementById('d_simulace').style.display = "none";
		document.getElementById('d_simulace_0').className = " ";
		document.getElementById('d_simulace').className = "thin-bottom-border";
		document.getElementById('op_extended').style.display = "none";
		document.getElementById('od_next').style.display = "none";
		document.getElementById('btn-calculate').innerHTML = "spočítat";
		}
} catch (error) {}
	}
	
function showOdeslat() {
try {
	if(document.forms.form['souhlas'].checked == true && document.forms.form['souhlas2'].checked == true) document.getElementById('fin_odeslat').style.display = "inline";
else document.getElementById('fin_odeslat').style.display = "none";
} catch (error) {}
	}	
	

function showOdeslatOP() {
try {
	if(document.forms.form['souhlas2'].checked == true) document.getElementById('fin_odeslat').style.display = "inline";
	else document.getElementById('fin_odeslat').style.display = "none";
} catch (error) {}
}	

function showOdeslatOP_() {
try {
	if(document.forms.form['souhlas2'].checked == true) {
		document.getElementById('fin_odeslat').style.display = "inline";
		document.getElementById('fin_odeslat_tmp').style.display = "none";
	}	else {
		document.getElementById('fin_odeslat').style.display = "none";
		document.getElementById('fin_odeslat_tmp').style.display = "inline";
	}
} catch (error) {}
}		
	
function showOdeslat_credial() {
try {
	if(document.forms.form['souhlas2'].checked == true) document.getElementById('fin_odeslat').style.display = "inline";
else document.getElementById('fin_odeslat').style.display = "none";
} catch (error) {}
	}		

function setSouhlas() {
	try {
		
		if(document.forms.form['souhlas'].checked == true) {
			document.forms.form['f[os_souhlas]'].value = 1;
			} else {
			document.forms.form['f[os_souhlas]'].value = 0;	
				}
		
		} catch (error) {}
	}
	
function showIC() {
	try {
	
	var val = document.forms.form['f[d_zam.za_kod]'].value.split('|')[0];//0
	var val_sk = document.forms.form['f[zam_sk1]'].value;//0
	//alert (document.getElementById('ic').style.display);
	//if ((val > 9 && val < 30  && val != "") || val == 1) {
	
	//10,15,20,29,92,95	
	//alert(document.forms.form['f[d_zam.za_kod]'].value+'-'+val);
	
	if (val == 10 || val == 15 || val == 20 || val == 29 || (val == 92 && val_sk == 1) || val == 95 ) {
		document.getElementById('ic').style.display = "block";		
	} else {
	document.getElementById('ic').style.display = "none";
	document.forms.form['f[d_zam.za_ico]'].value = "";
	}
	
} catch (error) {/*alert("a");*/}
	
	//alert(document.forms.formular['Z_FORM[d_zam.za_kod]'].value.split('|')[0]);
	}	
	
	
function MainPageBookmark() 
{
	title=document.title; url=document.location.href;
	if (window.sidebar) 
		{ 
			window.sidebar.addPanel(title, url,"");
		} else if ( window.external ) { 
			window.external.AddFavorite( url, title); 
			} else if (window.opera && window.print) { 
				return true; 
			}
}

function switchCustomerService(myUrl) {
	if (myUrl == "zakaznicke-centrum") {
		//alert(myUrl);
		document.getElementById('meinMenu-1').className = " ";
		try {document.getElementById('meinMenu-2').className = " ";} catch (error) {}
		//document.getElementById('meinMenu-3').className = " ";
		document.getElementById('meinMenu-4').className = "active";
	}	
}

function dopln_RC(rc) {}

function rc_fwd(item, next_item_name) {
	if (item.value.length == 6) document.forms.form[next_item_name].focus();
}

function getElementsByClassName(oClassNames, strTagName, oElm){
    if (oElm == null)
        oElm = document;
    if (strTagName == null)
        strTagName = '*';
    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
  
    var arrReturnElements = new Array();
    var arrRegExpClassNames = new Array();
    if(typeof oClassNames == "object"){
        for(var i = 0; i < oClassNames.length; i++){
            arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
        }
    }
    else{
        arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
    }
    var oElement;
    var bMatchesAll;
    for (var j = 0; j < arrElements.length; j++){
        oElement = arrElements[j];
        bMatchesAll = true;
        for(var k = 0; k < arrRegExpClassNames.length; k++){
            if(!arrRegExpClassNames[k].test(oElement.className)){
                bMatchesAll = false;
                break;                      
            }
        }
        if (bMatchesAll){
            arrReturnElements.push(oElement);
        }
    }
    return (arrReturnElements)
}
// pro ie5 nutno pridat podporu metody push pro pole
if(typeof Array.prototype.push != "function"){
    Array.prototype.push = ArrayPush;
    function ArrayPush(value){
        this[this.length] = value;
    }
}

function changeInput(input) {
	input.style.backgroundImage="url(/images/page/input_bg.jpg)";
}

function setForms() {
try {
	for(var z = 0, f = document.getElementsByTagName('form').length; z < f; z++) {
			document.getElementsByTagName('form').item(z).setAttribute('autocomplete', 'off');
		}
	} catch (error) {}
}

function addEvent(obj, evType, fn){
 if (obj.addEventListener){
   obj.addEventListener(evType, fn, false);
   return true;
 } else if (obj.attachEvent){
   var r = obj.attachEvent("on"+evType, fn);
   return r;
 } else {
   return false;
 }
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  }
  return false;
} 

var __isIE =  navigator.appVersion.match(/MSIE/);
var __userAgent = navigator.userAgent;
var __isFireFox = __userAgent.match(/firefox/i);
var __isFireFoxOld = __isFireFox && (__userAgent.match(/firefox\/2./i) || __userAgent.match(/firefox\/1./i));
var __isFireFoxNew = __isFireFox && !__isFireFoxOld;


function __parseBorderWidth(width) {
    var res = 0;
    if (typeof(width) == "string" && width != null && width != "" ) {
        var p = width.indexOf("px");
        if (p >= 0) {
            res = parseInt(width.substring(0, p));
        }
        else {
     		//do not know how to calculate other values (such as 0.5em or 0.1cm) correctly now
    		//so just set the width to 1 pixel
            res = 1; 
        }
    }
    return res;
}


//returns border width for some element
function __getBorderWidth(element) {
	var res = new Object();
	res.left = 0; res.top = 0; res.right = 0; res.bottom = 0;
	if (window.getComputedStyle) {
		//for Firefox
		var elStyle = window.getComputedStyle(element, null);
		res.left = parseInt(elStyle.borderLeftWidth.slice(0, -2));  
		res.top = parseInt(elStyle.borderTopWidth.slice(0, -2));  
		res.right = parseInt(elStyle.borderRightWidth.slice(0, -2));  
		res.bottom = parseInt(elStyle.borderBottomWidth.slice(0, -2));  
	}
	else {
		//for other browsers
		res.left = __parseBorderWidth(element.style.borderLeftWidth);
		res.top = __parseBorderWidth(element.style.borderTopWidth);
		res.right = __parseBorderWidth(element.style.borderRightWidth);
		res.bottom = __parseBorderWidth(element.style.borderBottomWidth);
	}
   
	return res;
}

//returns absolute position of some element within document
function getAbsolutePos(element) {
	var res = new Object();
	res.x = 0; res.y = 0;
	if (element !== null) {
		res.x = element.offsetLeft;
		res.y = element.offsetTop;
    	
		var offsetParent = element.offsetParent;
		var parentNode = element.parentNode;
		var borderWidth = null;

		while (offsetParent != null) {
			res.x += offsetParent.offsetLeft;
			res.y += offsetParent.offsetTop;
			
			var parentTagName = offsetParent.tagName.toLowerCase();	

			if ((__isIE && parentTagName != "table") || (__isFireFoxNew && parentTagName == "td")) {		    
				borderWidth = __getBorderWidth(offsetParent);
				res.x += borderWidth.left;
				res.y += borderWidth.top;
			}
		    
			if (offsetParent != document.body && offsetParent != document.documentElement) {
				res.x -= offsetParent.scrollLeft;
				res.y -= offsetParent.scrollTop;
			}

			//next lines are necessary to support FireFox problem with offsetParent
   			if (!__isIE) {
    			while (offsetParent != parentNode && parentNode !== null) {
					res.x -= parentNode.scrollLeft;
					res.y -= parentNode.scrollTop;
					
					if (__isFireFoxOld) {
						borderWidth = kGetBorderWidth(parentNode);
						res.x += borderWidth.left;
						res.y += borderWidth.top;
					}
    				parentNode = parentNode.parentNode;
    			}    
			}

   			parentNode = offsetParent.parentNode;
    		offsetParent = offsetParent.offsetParent;
		}
	}
    return res;
}

function openInfoPoj() {
	var text_v = form_help["d_asm"];
	
	wi = Math.floor(Math.random() * 1000) + 1000
	myWindow = window.open('', wi.toString(), 'status=no,width=400,height=400,resizable=no,menubar=no,scrollbars=yes,toolbar=no')
	myWindow.document.write('<html><head><title>Cetelem</title><link rel="StyleSheet" href="/styles/popup.css" type="text/css"></head><body>')
	myWindow.document.write('<div id="cont" style="background: white; padding: 10px; text-align: left; margin:10px;">')
	myWindow.document.write('<div style="margin: 10px;">' + text_v + '</div>')	
	myWindow.document.write('</div> ')
	myWindow.document.write('</body></html>')
	myWindow.document.close();
}

function openInfoWindow(params) {
	var text_v = params.text ? params.text : "";
	var _width = params.width ? params.width : 400;
	var _height = params.height ? params.height : 400;
	var _resizable = params.resizable ? params.resizable : "no";
	var _menubar = params.menubar ? params.menubar : "no";
	var _scrollbars = params.scrollbars ? params.scrollbars : "yes";
	var _toolbar = params.toolbar ? params.toolbar : "no";
	var _print = params.print ? params.print : false;
	
	wi = Math.floor(Math.random() * 1000) + 1000
	myWindow = window.open('', wi.toString(), 'status=no,width='+_width+',height='+_height+',resizable='+_resizable+',menubar='+_menubar+',scrollbars='+_scrollbars+',toolbar=' + _toolbar)
	myWindow.document.write('<html><head><title>Cetelem</title><link rel="StyleSheet" href="/styles/popup.css" type="text/css"></head><body>')
	myWindow.document.write('<div id="cont" style="background: white; padding: 10px; text-align: left; margin:10px;">')
	myWindow.document.write('<div style="margin: 10px;">' + text_v + '</div>')	
	myWindow.document.write('</div> ')
	myWindow.document.write('</body></html>')
	myWindow.document.close();
	if (_print) myWindow.print();
}

//v IE6,7,8 neni implementovana getElementByClassName
function getElementsByClassName(oClassNames, strTagName, oElm){
   if (oElm == null)
       oElm = document;
   if (strTagName == null)
       strTagName = '*';
   var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
 
   var arrReturnElements = new Array();
   var arrRegExpClassNames = new Array();
   if(typeof oClassNames == "object"){
       for(var i = 0; i < oClassNames.length; i++){
           arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
       }
   }
   else{
       arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
   }
   var oElement;
   var bMatchesAll;
   for (var j = 0; j < arrElements.length; j++){
       oElement = arrElements[j];
       bMatchesAll = true;
       for(var k = 0; k < arrRegExpClassNames.length; k++){
           if(!arrRegExpClassNames[k].test(oElement.className)){
               bMatchesAll = false;
               break;                      
           }
       }
       if (bMatchesAll){
           arrReturnElements.push(oElement);
       }
   }
   return (arrReturnElements)
}
//END v IE6,7,8 neni implementovana getElementByClassName
//detekce mobilniho zarizeni a obaleni zelene linky do odkazu tel:
function mobileGreenLineAnchor() {    
	var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));  
	if (mobile) {
		var bodyClass = document.body;
		if(bodyClass.className){
			bodyClass.className += " mobi";
		}else{
			bodyClass.className = "mobi";
		}
		var wrapper = document.createElement('a');
			wrapper.setAttribute("href", "tel:+420844840840");
		var green_line = document.getElementsByClassName('green_line'); 
			green_line = green_line[0];
			wrapper.appendChild(green_line.cloneNode(true));
			green_line.parentNode.replaceChild(wrapper, green_line);
	}
}
//END detekce mobilniho zarizeni a obaleni zelene linky do odkazu tel:
