function popup(page,w,h)
{
  if (screen.availHeight<h) hx=screen.availHeight;
  else hx=h;  
  
  if (screen.availWidth<w) wx=screen.availWidth;
  else wx=w;   

	oldal = window.open(page, 'pop', 'status=no,width='+w+'px,height='+h+'px,toolbar=no,location=no,directories=no,scrollbars=no,resizable=no,copyhistory=no');
	oldal.moveTo(((screen.availWidth/2)-(wx/2)), ((screen.availHeight/2)-(hx/2)));
  oldal.resizeTo(w,h);  
	oldal.focus();
}


function FlashOut(url,width,height)
{

  url = url + '.swf';

  document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
  document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" ');
  document.write(' WIDTH=' + width + ' HEIGHT=' + height + '>');
  document.write(' <PARAM NAME=movie VALUE="' + url + '">	<PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high><PARAM NAME="scale" VALUE="scale"><PARAM NAME="wmode" VALUE="transparent"><PARAM NAME="bgcolor" VALUE="#FFFFFF">'); 
  document.write(' <EMBED src="' + url + '" quality=high bgcolor=#FFFFFF scale="scale" wmode="transparent" ');
  document.write(' swLiveConnect=TRUE WIDTH=' + width + ' HEIGHT=' + height);
  document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
  document.write(' </EMBED></OBJECT>');
}

function setcolor(r, color)
{
    if (color == "" || typeof(r.style) == "undefined") {
        return false;
    }
    if (typeof(document.getElementsByTagName) != "undefined") {
        var theCells = r.getElementsByTagName("td");
    }
    else if (typeof(r.cells) != "undefined") {
        var theCells = r.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = color;
    }

    return true;
}