// antileech begin
function antileech (address) {
address = address.split("-klopkazamapsove@"); // * moze biti bilo koji string
address = address.join("@");
window.open ('mailto:'+address,'_blank');
}
// antileech end

// show hide div begin
var isIE=document.all?true:false;
var isDOM=document.getElementById?true:false;
var isNS4=document.layers?true:false;

function showhide(_div,_act) {
  if (isDOM)
  {
    document.getElementById(_act+"_").style.display="none";
    document.getElementById(_div+"_").style.display="block";
    
    document.getElementById(_act+"_ON").id=_act;
    document.getElementById(_div).id=_div+"_ON";
  }
  else if (isIE) {
    eval("document.all."+_act+"_.style.display='none';");
    eval("document.all."+_div+"_.style.display='block';");
    
    eval("document.all."+_act+"_ON.id="+_act+";");
    eval("document.all."+_div+".id="+_div+"_ON;");
  }
  else if(isNS4)
  {
    eval("document.layers['"+_act+"_'].display='none';");
    eval("document.layers['"+_div+"_'].display='block';");
    
    eval("document.layers['"+_act+"_ON'].id="+_act+";");
    eval("document.layers['"+_div+"'].id="+_div+"_ON;");
}
  return _div;
}
// show hide div end

// field blur begin
function fieldtxt(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;
	}
}
// field blur end

// adding fields in adminstration begin
// onclick="moreFields(this.parentNode.parentNode)"
function moreFields(nodeCode)
{
	var newFields = nodeCode.cloneNode(true);
	nodeCode.parentNode.insertBefore(newFields,nodeCode);
}
function danger(msg)
{
	document.returnValue = confirm(msg);
}
// adding fields in adminstration end

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

function PopUp(url,w,h,windowName)
{
var visina=w;
var sirina=h;
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);
}
