
function ylib_Browser() {
 d=document;
 this.agt=navigator.userAgent.toLowerCase();
 this.major = parseInt(navigator.appVersion);
 this.dom=(d.getElementById)?1:0; // true for ie6, ns6
 this.ns=(d.layers);
 this.ns4up=(this.ns && this.major >=4);
 this.ns6=(this.dom&&navigator.appName=="Netscape");
 this.op=this.agt.indexOf('opera')!=-1;
 this.ie=(d.all);
 this.ie4=(d.all&&!this.dom)?1:0;
 this.ie4up=(this.ie && this.major >= 4);
 this.ie5=(d.all&&this.dom);
 this.win=((this.agt.indexOf("win")!=-1) || (this.agt.indexOf("16bit")!=-1));
 this.mac=(this.agt.indexOf("mac")!=-1);
 if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) this.safari=true;
 else this.safari=false; 
}

var oBw = new ylib_Browser();



function big_photo(f,w,h) {
    self.open('../_textpage.php?f=foto&b='+f, null, "width="+w+",height="+h+",toolbar=0,scrollbars=yes,resizable=yes");
}  


function pop_up(f) {
    self.open('../_textpage.php?f='+f, null, "width=500,height=500,toolbar=0,scrollbars=yes,resizable=yes");
}  

function pop_upr(f,a,b,c,d) {
    /*self.open('http://rws.rhapsody.com/rhapsody_tools/linktool/index.jsp?origincode=real&lock=rhapsody', 'messageWindow', "screenX=0, screenY=0, width=500, height=600, toolbar=0, scrollbars=1, resizable=yes");*/
    /*self.open('http://directory.listen.com/rhapsody_tools/linktool/chooselink.jsp?&cobrandid=1&origincode=affiliate&redir=http%3A%2F%2Fwww.qksrv.net%2Fclick-%24pass.pid%24-%24pass.aid%24%3Furl%3D%24link%24%2526altdl%253Dcj&lock=rhapsody&pass.aid=10361734&pass.pid=1904864', 'messageWindow', "screenX=0, screenY=0, width=500, height=600, toolbar=0, scrollbars=1, resizable=yes");*/
    self.open('../_link.php?a='+a+'&b='+b+'&c='+c+'&el='+d, 'messageWindow', "screenX=0, screenY=0, width=800, height=430, toolbar=0, scrollbars=1, resizable=yes");
}  

function pop_url(url) {
    self.open(url, null, "width=600,height=500,toolbar=0,scrollbars=yes,resizable=yes");
}  


function send_friend(d)
{
    var p=opener.document.forms["invite"];
    
    for (var i=0; i<5; i++) 
    {
        var el=p.elements["htofriendmail["+i+"]"];
            el.value=d.elements["tofriendmail["+i+"]"].value;        
        var el=p.elements["htofriendname["+i+"]"];            
            el.value=d.elements["tofriendname["+i+"]"].value;                
    }

    p.tofriend.value="go";
    p.submit();
    self.close();    
}

function reportError(request) {
    alert('Sorry. There was an error.');
}


var oldStatus='';
function setStatus(text) {
    oldStatus=window.status;
    window.status=text;
    return true;
}

function restoreStatus() {
    window.status=oldStatus;
}

function openWindow(width,height,name) {
x = (640 - width)/2, y = (480 - height)/2;

if (screen) {
y = (screen.availHeight - height)/2;
x = (screen.availWidth - width)/2;
}
if (screen.availWidth > 1800) {
x = ((screen.availWidth/2) - width)/2;
}

window.open(name,'asoundmatch','status='+1+',menubar='+0+',toolbar='+0+',scrollbars='+1+',width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

}
