function onStage(img)
{
	var ie = document.all;
	var ns6 = document.getElementById && !document.all;
    
	if (ie){
        document.all['Anchor'].style.backgroundImage="url(/images/"+img+")";
        
    }else if(ns6){
        //alert ('got ns6');
        document.getElementById('Anchor').style.backgroundImage="url(/images/"+img+")";
        //alert(document.getElementById('Stage').style.backgroundImage);
    }else{
        alert ('You need Internet Explorer 5+ or Netscape 6+ to view this page!');
    }
}
function offStage(){
	var ie = document.all;
	var ns6 = document.getElementById && !document.all
    
	if (ie){
        document.all['Anchor'].style.backgroundImage="url(/images/Black.gif)";
    }else if(ns6){
        //alert ('got ns6');
        document.getElementById('Anchor').style.backgroundImage='url(/images/Black.gif)';
        //alert(document.getElementById('Stage').style.backgroundImage);
    }else{
        alert ('You need Internet Explorer 5+ or Netscape 6+ to view this page!');
    }
}
function playMe(track){
    window.open("/scripts/play.pl?track="+track,"player","scrollbars=no,width=325,height=50,leftmargin=0,topmargin=0,marginheight=0,marginwidth=0");
}
function openPopup(str,name,w,h) {
    if (!name) {
        var date=new Date();
        name=date.getTime();
    }
    if (!w) {
        w=725;
    }
    if (!h) {
        h=575;
    }
    window.open(str,name,"height="+h+",width="+w+",resizable,scrollbars=yes");
    return false;
}
function showByPosition(e,object,x,y) {
    
    if (document.getElementById) {

        var obj=document.getElementById(object);
        
        if(window.event){
           
            e = window.event;
            
            if ((e.x + x + obj.clientWidth) > (document.body.clientWidth))
                x = (document.body.clientWidth + document.body.scrollLeft) - obj.clientWidth;
            else
                x = e.x + x + document.body.scrollLeft;
    
            if ((e.y + y + obj.clientHeight) > (document.body.clientHeight)){
                y = e.y - obj.clientHeight - 15 + document.body.scrollTop;
            }
            else{
                y = e.y + y + document.body.scrollTop;
            }
            obj.style.left = x;
            obj.style.top = y;
            obj.style.visibility = 'visible';
        
        }else{
            
            if ((e.clientX + x + obj.style.width) > (window.scrollX + window.innerWidth))
                x = x - obj.style.width;
    
            if ((e.clientY + y + obj.style.height) > (window.scrollY + window.innerHeight))
                y *= -4;
            obj.style.left = e.clientX + x;
            obj.style.top = e.clientY + y;
            obj.style.visibility = 'visible';
        }
        
    }else{
        alert("Sorry, your browser is not DOM 2-compliant. Upgrade to latest version!");
    }
}
function showAbsolute(e,object,x,y) {
    
    if (document.getElementById) {
        obj=document.getElementById(object);
        obj.style.left = x;
        obj.style.top = y;
        obj.style.visibility = 'visible';
    }else{
        alert("Sorry, your browser is not DOM 2-compliant. Upgrade to latest version!");
    }
}
function hide(e,index) { // GK added (used in Unit Quick View)
    var object='l_'+index;
    if (document.getElementById) {
        var obj=document.getElementById(object);
        obj.style.visibility = 'hidden';
    }
}
function show(event,ind,x,y){
    if(!x) x=100;
    if(!y) y=177;
    var layer='l_'+ind;
    //showByPosition(event,layer,x,y);
    showAbsolute(event,layer,x,y);
}


