function getTextPixelWidth(wText,className) {
    div=document.createElement("DIV");
    div.innerHTML=wText;
    div.className = className;

    div.style.position='absolute';
    div.style.top=150;
    div.style.left=150;
    div.style.width='auto';
    div.style.visibility='hidden';
    div.style.whiteSpace='nowrap';
    document.body.appendChild(div);        
    width=div.offsetWidth+0;    
    document.body.removeChild(div);    
    return width;
}

function flash( swf, width, height){
	document.write('<object type="application/x-shockwave-flash"\n');
	document.write('  data="'+swf+'" width="'+width+'" height="'+height+'">\n');
	document.write('<param name="movie" value="'+swf+'" /><param name=wmode value=opaque>\n');
	document.write('</object>\n');
}

function flash_popup( swf, width, height, id){
	document.write('<p>\n');
	document.write('<object type="application/x-shockwave-flash"\n');
	document.write('  data="'+swf+'" width="'+width+'" height="'+height+'" id="'+id+'">\n');
	document.write('<param name="movie" value="'+swf+'" /><param name=wmode value=transparent><param name=loop value=false><param name=menu value=false><param name=bgcolor value=#FFFFFF>\n');
	document.write('</object>\n');
	document.write('</p>\n');
}

function openDialog(width,height)
{
	window.name = "oldwin";
	dialog = window.open('dialog.php','Dialog','left=0,top=0,width='+width+',height='+height+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	dialog.opener = self;
	window.dialog.focus();
}

function startReklama()
{
	document.getElementById('reklama').className = "reklamaOn";
}

function stopReklama()
{
	document.getElementById('reklama').className = "reklamaOff";
}