<!--
var w = window.screen.width;
var h = window.screen.height;


/* =====---------------------------------===== */

function gEBI(eID) {
	if (document.getElementById) {
		var obj = document.getElementById(eID);
		return obj;
	}
}	// gEBI()


/* =====---------------------------------===== */

function CreateLink( name, domena, text ){
zavinac = "@"

    if( CreateLink.arguments.length == 2 ) {

		document.write('<a href="mailto:'+ name + zavinac + domena +'">'+ name + zavinac + domena +'<\/a>');

	} else {

		document.write('<a href="mailto:'+ name + zavinac + domena +'">'+ text +'<\/a>');
  
	}

}	// CreateLink()


/* =====---------------------------------===== */

function CreateElink( name, domena, text ) {
zavinac = "@"

    if( CreateElink.arguments.length == 2 ) {

		document.write('<a href="mailto:'+ name + zavinac + domena +'">'+ name + zavinac + domena +'<\/a>');

	} else {

		document.write('<a href="mailto:'+ name + zavinac + domena +'">'+ text +'<\/a>');
  
	}

}	// CreateElink()


/* =====---------------------------------===== */

function CreateWlink( odkaz, text ) {

    if( CreateWlink.arguments.length == 1 ) {

		document.write('<a href="'+ odkaz +'">'+ odkaz +'<\/a>');

	} else {

		document.write('<a href="'+ odkaz +'">'+ text +'<\/a>');
  
	}

}	// CreateWlink()




/* =====---------------------------------===== */
/* ====          M E S S A G E S          ==== */
/* =====---------------------------------===== */


function MsgShow(idecko,sec) {
	if (document.getElementById) document.getElementById(idecko).style.display = '';
	if (parseInt(sec) > 0) setTimeout("MsgClose('"+idecko+"',false)", parseInt(sec) * 1000);
}


/* =====---------------------------------===== */

function MsgClose(idecko,zpet) {
	if (document.getElementById) document.getElementById(idecko).style.display = 'none';
	if (zpet) history.go(-1);
}


/* =====---------------------------------===== */

function LinkMsgShow(id,typ,skc,plus) {

	var myEL =	gEBI('elm' + id);
	var myY =	el_getWindowOffsetTop(myEL);
	var myX =	el_getWindowOffsetLeft(myEL);

	var dm = gEBI('SendLink');
	var dmf = gEBI('frmSendLink');
	var dmPosT = myY - 145;
	var dmPosL = myX - 250 + plus;

	dm.style.top = dmPosT + 'px';
	dm.style.left = dmPosL + 'px';
	dm.style.display = '';
	dmf.tID.value = id;
	dmf.typ.value = typ;
	dmf.skc.value = skc;

}




/* =====----------------------------------------===== */
/* ====   Funkce pro IE k ziskani pozice prvku   ==== */
/* =====----------------------------------------===== */

function el_getPageOffsetLeft (el) {
	var ol = el.offsetLeft;
	while ((el = el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
}


/* =====---------------------------------===== */

function el_getWindowOffsetLeft (el) {
	return el_getPageOffsetLeft(el) - document.body.scrollLeft;
}


/* =====---------------------------------===== */

function el_getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el = el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
}


/* =====---------------------------------===== */

function el_getWindowOffsetTop (el) {
	return el_getPageOffsetTop(el) - document.body.scrollTop;
}



/* =====-------------------------------------===== */
/* ====   Pozicovani a fixovani SkyScraperu   ==== */
/* =====-------------------------------------===== */

/*function SkyStyle() {

	var ww = window.screen.width - 985;
	var x = ww / 2 + 983;

	document.write ('<style>');
	document.write ('.SkyScraper {');
	document.write ('left\:'+ x +'px\;');
	document.write ('}');
	document.write ('<\/style>');

}

SkyStyle();
*/

/* =====---------------------------------===== */

function getMyPoz() {

	var scrOfY = 0;

	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		scrOfY = window.pageYOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		scrOfY = document.body.scrollTop;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
	}

	return scrOfY;
}


/* =====---------------------------------===== */

function fixedEl(id) {

	if (gEBI(id)) {
		//alert('OK');

		var myY = getMyPoz();

		if (myY > 98) {
			gEBI(id).style.position = 'fixed';
			gEBI(id).style.top = 2 + 'px';
		} else {
			gEBI(id).style.position = 'absolute';
			gEBI(id).style.top = document.body.scrollTop + 101 + 'px';
		}

	}

}




/* =====------------------------------------------===== */
/* ====    De/Aktivace submit buttonu u souteze    ==== */
/* =====------------------------------------------===== */

function SoutezSouhlas(el,btn) {

var sBtn = gEBI(btn);

	if (el.checked) {
		sBtn.className = 'soutezBtn';
		sBtn.disabled = false;
	} else {
		sBtn.className = 'soutezBtnX';
		sBtn.disabled = true;
	}

}


/* =====-----------------------------------===== */
/* ====    Kontrola soutezniho formulare    ==== */
/* =====-----------------------------------===== */

function CheckSoutezForm(frm) {

var tf = gEBI(frm);
//var mBtn = gEBI('soutezBtn');
//var mBtn = tf.soutezBtn;
var vysledek = true;
var errtxt = '';

	if (tf.sJmeno.value == '')		{ vysledek = false; gEBI('sJmeno').className = 'sTabTxtErr'; }		else { gEBI('sJmeno').className = 'sTabTxt'; }
	if (tf.sPrijmeni.value == '')	{ vysledek = false; gEBI('sPrijmeni').className = 'sTabTxtErr'; }	else { gEBI('sPrijmeni').className = 'sTabTxt'; }
	if (tf.sMesto.value == '')		{ vysledek = false; gEBI('sMesto').className = 'sTabTxtErr'; }		else { gEBI('sMesto').className = 'sTabTxt'; }
	if (tf.sEmail.value == '' || tf.sEmail.value.indexOf('@') == -1 ) {
		vysledek = false; gEBI('sEmail').className = 'sTabTxtErr'; } else { gEBI('sEmail').className = 'sTabTxt'; }

	if (! vysledek) {

	//	var myY =	el_getWindowOffsetTop(mBtn);
	//	var myX =	el_getWindowOffsetLeft(mBtn);

	//	var dm = gEBI('ErrMsg');
	//	var dmPosT = myY - 210;
	//	var dmPosL = myX - 170;

	//	dm.style.top = dmPosT + 'px';
	//	dm.style.left = dmPosL + 'px';
	//	dm.style.display = '';
		MsgShow('ErrMsg',0);

	}


return vysledek;

}

//-->
