function getPosition(obj) {
    var o=obj; 
    var x=0, y=0; 
    while(o) { 
        x+=o.offsetLeft; 
        y+=o.offsetTop; 
        o=o.offsetParent; 
    } 
    return [x,y]; 
}



var wind;

function big_photo(t,iid,foto,w,h) {
    if (wind) {
        wind.close();
    }
    w=w;
    h=h;
    
    wind=self.open('/photo.php?'+t+'&iid='+iid+'&foto='+foto, null, "width="+w+",height="+h+",toolbar=0,scrollbars=no,resizable=yes,top=100,left=100");
    return false;
}  

function zay(th) {
    if (wind) {
        wind.close();
    }    
    wind=self.open(th+'&nomenu=1', null, "width=660, height=500, toolbar=0, scrollbars=yes, resizable=yes, top=100, left=200");        
    return false;
}
