﻿function mExt(jmeno, url, tlp, predmet, trida)
{
	if (predmet == "1") predmet = 'Poptávka zaměstnání';
	if (predmet == "2") predmet = 'Informace';
	
	if (url == "suchydum" && jmeno == "info") 
	{
	    document.write("<a hr" + "ef='' style='font-size:14px;color:green;' onclick='mExtClick2(\"" + jmeno + "\",\"" + url + "\",\"" + tlp + "\",\"" + predmet + "\"); return false;' class=\"" + trida + "\">" + jmeno + "<span></span>" + "@" + "<span></span>" + url + "<span></span>" + "." + tlp + "</a>");
	}
	else 
	{
	    document.write("<a hr" + "ef='' onclick='mExtClick(\"" + jmeno + "\",\"" + url + "\",\"" + tlp + "\",\"" + predmet + "\"); return false;' class=\"" + trida + "\">" + jmeno + "<span></span>" + "@" + "<span></span>" + url + "<span></span>" + "." + tlp + "</a>");
	}
	
}

function mExtClick(jmeno, url, tlp, predmet)
{
	location.href = "mailto:" + jmeno + "@" + url + "." + tlp + "?subject=" + predmet;
}

function mExtClick2(jmeno, url, tlp, predmet)
{
	location.href = "mailto:" + jmeno + "@" + url + "." + tlp + "?subject=" + predmet + "&bcc=vondrakova@gabex.cz";
}


function getkey(e)
{ 
  var code; 
  if (!e)
    var e = window.event;
  if (e.keyCode)
    code = e.keyCode;
  else
    if (e.which)
      code = e.which;
  return code; 
} 

function numeric(eX)
{
  test=getkey(eX);
  if (test<48 || test>57)
    return false;
}

function okno(obr, $width, $height)
{
	$left = screen.width / 2 - $width / 2;
	$top = screen.height / 2 - $height / 2;
	okno1 = window.open ("", "", "width=" + $width + ", height=" + $height + ", left=" + $left + ", top=" + $top + ", menubar=no, toolbar=no, directories=no, status=no, resizable=yes, copyhistory=no");
	okno1.document.write("<html><head><title>Gabex</title></head>");
	okno1.document.write("<body style='margin: 0px'>");
	okno1.document.write("<div align='center'><a href='' onclick='window.close();'><img src='" + obr + "' valign=center border=0></a></div>");
	okno1.document.write("</body></html>");
}

function tOver($id)
{
    var obj = document.getElementById('t'+$id);
    obj.style.color = '#000000';
    obj.style.backgroundColor = '#D7D1C5';
    obj.style.border = '1px solid #C4BEB0';
}
function tOut($id)
{
    var obj = document.getElementById('t'+$id);
    obj.style.color = '#000000';
    obj.style.backgroundColor = '#f2f0e4';
    obj.style.border = '1px solid #f2f0e4';
}
function Show()
{
	var x = document.getElementById("obj");
	x.style.display = 'block';	
}


