function PopUp(url,windowName)
{
var visina=500;
var sirina=450;
var leftPos = screen.availWidth/2-sirina/2;
var topPos =screen.availHeight/2-visina/2;
//var leftPos = 0;
//var topPos =0;

window.open(url, windowName, 'history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=no,width=' + sirina + ',height=' + visina + ',top=' + topPos + ',left=' + leftPos);
}

function PopUp_txt(url,windowName)
{
var visina=200;
var sirina=200;
var leftPos = screen.availWidth/2-sirina/2;
var topPos =screen.availHeight/2-visina/2;
//var leftPos = 0;
//var topPos =0;

window.open(url, windowName, 'history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=' + sirina + ',height=' + visina + ',top=' + topPos + ',left=' + leftPos);
}

function sendmail (address)
{
address = address.split("°"); // Change the * to any string for better personalization
address = address.join("@");
window.open ('mailto:'+address,'_self');
}


function poljetxt(elm, onoff)
{
	if (typeof(onoff) == "undefined" )
	{
		onoff = "blur";
	}

	if (!elm.base)
	{
		elm.base = elm.value;
	}

	if (elm.value == elm.base && onoff != "blur")
	{
		elm.value = "";
	}
	else if (elm.value == "" && onoff == "blur")
	{
		elm.value = elm.base;
	}
}

// POPUP SKRIPTA

// Set the horizontal and vertical position for the popup

PositionX = 30;
PositionY = 30;

//var leftPos = screen.availWidth/2-sirina/2;
//var topPos =screen.availHeight/2-visina/2;


// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4)
{
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
}

var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function slike(imageURL,imageTitle)
{
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document)
{
writeln('<html><head><title>STILU.net</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["IMG"].width;');writeln('window.innerHeight=document.images["IMG"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onclick="self.close()" onblur="self.close()">');
writeln('<img src="'+imageURL+'" name="IMG" style="display:block" alt="click to close"></body></html>');
close();		
}
}

function self_close(url,closeIt,delay)
{ 
//	opener.location.href = url;
	if (closeIt == true) setTimeout('self.close()',delay);
}

function total_refresh(url,closeIt,delay)
{ 
	opener.location.href = url;
//	if (closeIt == true) setTimeout('self.close()',delay);
}

var isIE=document.all?true:false;
var isDOM=document.getElementById?true:false;
var isNS4=document.layers?true:false;
var di='mirko';
var di2='slavko';
var di3='bomba';

/* _w : which ID (1) or (2) */
/* _h : (h)ide or (s)how */
function ChangeField(_w,_h) {
  if (isDOM)
  {
    if (_h=='s') document.getElementById(_w).style.display='block';
    if (_h=='h') document.getElementById(_w).style.display='none';
  }
  else if (isIE) {
    if (_h=='s') eval("document.all."+_w+".style.display='block';");
    if (_h=='h') eval("document.all."+_w+".style.display='none';");
  }
  else if(isNS4)
  {
    if (_h=='s') eval("document.layers['"+_w+"'].display='block';");
    if (_h=='h') eval("document.layers['"+_w+"'].display='none';");
  }
}



