/* funkce, ktera jednak vypise mail pres JS, cimz blokne boty a jednak pouzije entity, cimz je to jeste lepsi :) */
function js_protect_email(var1,var2)
{
	var zavinac = "&#64";
	var mailto = "mai&#108;&#116;&#111;&#58;";
	var e_mail = var1+zavinac+var2;
	var title = "title='"+e_mail+"'";

	document.write("<a href='"+mailto+e_mail+"'"+title+">"+e_mail+"</a>");
}


function pic_window(picfile, title, popis, picwidth, picheight){
	/*picheight += 100;*/
	window.open('pic_window.php?pic='+picfile+'&title='+title+'&popis='+popis+'', 'picwindow', 'width='+picwidth+',height='+picheight+'');
}

function insertFlash(eleId, swfFile, width, height, alt, wmode, flashVars)
{
	directFlashVars = '';
	if(flashVars != '')directFlashVars = '?'+flashVars;

	flashHtml =
	'<!--[if !IE]> -->'+"\n"+
	'<object type="application/x-shockwave-flash" data="'+swfFile+directFlashVars+'" width="'+width+'" height="'+height+'">'+"\n"+
	'<!-- <![endif]-->'+"\n"+
	'<!--[if IE]>'+"\n"+
	'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'">'+"\n"+
	'<param name="movie" value="'+swfFile+directFlashVars+'" />'+"\n"+
	'<!--><!---->'+"\n"+
	'<param name="loop" value="true" />'+"\n"+
	'<param name="menu" value="false" />'+"\n"

	if(wmode)flashHtml += '<param name="wmode" value="transparent" />'+"\n";
	if(flashVars != '')flashHtml += '<param name="flashvars" value="'+flashVars+'" />'+"\n";

	flashHtml += alt+"\n";
	flashHtml += '</object>'+"\n";
	flashHtml += '<!-- <![endif]-->'+"\n";

	obj = document.getElementById(eleId);
	obj.innerHTML = flashHtml;
}

function hideAllRows() {
    y = document.getElementById('table-list');

    objs = y.getElementsByTagName('TR');

    for (x = 1; x < objs.length; x++) {
        var varid = objs[x].id;
        document.getElementById(varid).style.backgroundColor="transparent";
        document.getElementById(varid).style.cursor="auto";
    }
}

function highlightRow(eleId) {
    hideAllRows();
    /*
    obj = document.getElementById(eleId);
    obj.style.backgroundColor="#f1e5bb";
    obj.style.cursor="pointer";
     */
    obj = document.getElementById(eleId);
    obj.style.backgroundColor="#f1e5bb";
    obj.style.cursor="pointer";

    tmp = document.getElementById('flash_flat').getElementsByTagName('OBJECT');
    flashid = tmp[0];
    flashid.SetVariable('jsflatevent', 'over');
    subId = eleId.substr(4);
    flashid.SetVariable('jsflat', subId);

}

function unhighlightRow(eleId) {
    obj = document.getElementById(eleId);
    obj.style.backgroundColor="transparent";
    obj.style.cursor="auto";
}

function showFlash(eleId) {
            alert (eleId);
            flashid = document.getElementById('flash_flat').firstChild;
            flashid.SetVariable('jsflat', eleId);
            flashid.SetVariable('jsflatevent', 'over');
}

function highlightRow2(eleId) {
    obj = document.getElementById(eleId);
    obj.style.backgroundColor="#f1e5bb";
    obj.style.cursor="pointer";
}


