function pop(file,w,h){
        window.open(file,"Popup1","status=no,scrollbars=yes,width="+w+",height="+h+",align=left,valign=top");
}

function pop2(file,w,h,scroll){
        window.open(file,"Popup2","status=no,scrollbars="+scroll+",width="+w+",height="+h+",align=left,valign=top");
}

function pop3(file,w,h){
        window.open(file,"Popup3","status=no,resizable=yes,scrollbars=yes,width="+w+",height="+h+",align=left,valign=top");
}

function popuser(user,w,h){
        window.open("/empty.php?page=members&action=viewmember&num="+eval(new String(user)),"Popup4","status=no,scrollbars=yes,width="+w+",height="+h+",align=left,valign=top");
}

function popteam(team,w,h){
        window.open("/empty.php?page=team&action=teamadm&team="+eval(new String(team)),"Popup5","status=no,scrollbars=yes,width="+w+",height="+h+",align=left,valign=top");
}

function DL_GetElementLeft(eElement)
{
    var nLeftPos = eElement.offsetLeft;          // initialize var to store calculations
    var eParElement = eElement.offsetParent;     // identify first offset parent element  
    while (eParElement != null)
    {                                            // move up through element hierarchy
        nLeftPos += eParElement.offsetLeft;      // appending left offset of each parent
        eParElement = eParElement.offsetParent;  // until no more offset parents exist
    }
    return nLeftPos;                             // return the number calculated
}

function DL_GetElementTop(eElement)
{
    var nTopPos = eElement.offsetTop;            // initialize var to store calculations
    var eParElement = eElement.offsetParent;     // identify first offset parent element  
    while (eParElement != null)
    {                                            // move up through element hierarchy
        nTopPos += eParElement.offsetTop;        // appending top offset of each parent
        eParElement = eParElement.offsetParent;  // until no more offset parents exist
    }
    return nTopPos;                              // return the number calculated
}

var tout1;
var tout2;
var tout3;
var tout4;
var tout5;

function blao(id){
	if(id == "ID01"){
		MM_showHideLayers('ID01','','show');
		clearTimeout(tout1);
	}
	if(id == "ID02"){
		MM_showHideLayers('ID02','','show');
		clearTimeout(tout2);
	}
	if(id == "ID03"){
		MM_showHideLayers('ID03','','show');
		clearTimeout(tout3);
	}
	if(id == "ID04"){
		MM_showHideLayers('ID04','','show');
		clearTimeout(tout4);
	}
	if(id == "ID05"){
		MM_showHideLayers('ID05','','show');
		clearTimeout(tout5);
	}

}

function unblao(id){
	if(id == "ID01"){
		tout1 = setTimeout("MM_showHideLayers('ID01','','hide')",50);
	}
	if(id == "ID02"){
		tout2 = setTimeout("MM_showHideLayers('ID02','','hide')",50);
	}
	if(id == "ID03"){
		tout3 = setTimeout("MM_showHideLayers('ID03','','hide')",50);
	}
	if(id == "ID04"){
		tout4 = setTimeout("MM_showHideLayers('ID04','','hide')",50);
	}
	if(id == "ID05"){
		tout5 = setTimeout("MM_showHideLayers('ID05','','hide')",50);
	}
}

function MM_findObj(n, d) { //v4.0
	var p,i,x;
	if(!d)
		d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all)
		x=d.all[n];
	for (i=0;!x&&i<d.forms.length;i++)
		x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++)
		x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById)
		x=document.getElementById(n);
	return x;
}

function MM_showHideLayers() { //v3.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;

	for (i=0; i<(args.length-2); i+=3) 
		if ((obj=MM_findObj(args[i]))!=null) {
			v=args[i+2];
	    		if (obj.style) { 
				obj=obj.style;
				v=(v=='show')?'visible':(v='hide')?'hidden':v; 
			}
			obj.visibility=v;
		}
}
