function newWindow(obj,wWidth,wHeight)
{if(obj==null)
return false;var name="obrazek"+Math.ceil(Math.random()*3000);var width=(wWidth==null)?500:parseInt(wWidth);var height=(wHeight==null)?400:parseInt(wHeight);var loc=null;if(obj.tagName=="A"&obj.getAttribute("href")!=null)
{loc=obj.getAttribute("href");}
if(loc!=null)
{wnd=window.open(loc,name,'toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,resizable=yes,status=no,width='+width+',height='+height);wnd.focus();return false;}
else
{return true;}}
var wndMargin=0;var screenW,screenH;screenW=window.screen.availWidth;screenH=window.screen.availHeight;function closeWindow()
{if(window.opener!=null)
{window.opener.focus();}
this.window.close();}
function resizeWindow(w,h)
{var wndW,wndH=0;var posX,posY=0;w+=wndMargin;h+=wndMargin;if(w>=screenW)
wndW=screenW;else
wndW=w;if(h>=screenH)
wndH=screenH;else
wndH=h;posX=Math.ceil((screenW/2)-(wndW/2));posY=Math.ceil((screenH/2)-(wndH/2));if(posX<0)
posX=0;if(posY<0)
posY=0;window.resizeTo(wndW,wndH);window.moveTo(posX,posY);}
function display(id,doDisplay)
{var layer=document.getElementById(id);if(layer==null)
return;if(doDisplay==null)
{layer.style.display=(layer.style.display=='none')?'block':'none';}
else
layer.style.display=(doDisplay==true)?'block':'none';return false;}
function clearInput(input,defaultValue)
{if(input.value==defaultValue)
{input.value='';}
return false;}
function iframeAdmin(url,activeObj)
{if(document.getElementById(activeObj)==null)
{return false;}
document.getElementById(activeObj).src=url;document.getElementById(activeObj).width='800';document.getElementById(activeObj).height='650';display(activeObj,true);display('editer_'+activeObj,false);display('close_'+activeObj,true);return false;}
function showArea(obj,show)
{if(show==true)
{document.getElementById(obj).className="admin_box";}
else
{document.getElementById(obj).className="";}
return false;}
