
// base js code

function get_iframe(str){parent.freim.location = "_iframe.php?"+str;}


function forma_obhod(frm)
{
var cont = frm.elements.length;
var atr1 ;
for ( var i = 0 ; i < cont ; i++)
{
if(frm.elements[i].getAttribute("zp") == 1)
{
if(frm.elements[i].value == "" )
{
frm.elements[i].focus();
frm.elements[i].className = "brd";
alert(frm.elements[i].getAttribute("msg"));
return false;
}
frm.elements[i].className = "pusto";
}
}
return true;
}


function getXY(a)
{
var str = {x:0,y:0,w:0,h:0};
str.x = a.offsetLeft;
str.y = a.offsetTop;
str.w = a.offsetWidth;
str.h = a.offsetHeight;

while (a.offsetParent != null)
{
a = a.offsetParent;
str.x += a.offsetLeft;
str.y += a.offsetTop;
}

return str;
}


function hineM(id){document.getElementById(id).style.display = 'none';}
function showM(id){document.getElementById(id).style.display = 'inline';}

// ustanovitj cookie
function SetCookie(name, value, weeks )
{
var today = new Date();
var expires = new Date(today.getTime() + weeks*7*24*60*60*1000);
document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString();
}






