ns = (document.layers) ? true:false;

MidX=screen.availWidth/2
MidY=screen.availHeight/2

var currentpos = 0;

function popup(URL,WIDTH,HEIGHT)
{
	if (ns)
	{
		popupdate = new Date()	
		window.open(URL,'E2Ewindow'+popupdate.getTime(),'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,top='+(MidY-(HEIGHT/2)-30)+',left='+(MidX-(WIDTH/2))+',width='+WIDTH+',height='+HEIGHT);
	}
	else
	{
		popupdate = new Date()	
		window.open(URL,'E2Ewindow'+popupdate.getTime(),'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,top='+(MidY-(HEIGHT/2)-30)+',left='+(MidX-(WIDTH/2))+',width='+WIDTH+',height='+HEIGHT);
	}
}





//var selectedValue = "document.getElementById('div1')";
//var selectedTr = "tr1";
//var selectedSpan = "Span1";

//function HideShowDivs( obj, TrId , spanId ) {
//    if (typeof(eval(selectedValue)) == 'object')
//    {
//        eval(selectedValue).style.display='none';
//        selectedValue = '';
//        
//        document.getElementById(selectedTr).style.backgroundColor = '#ffffff';
//        selectedTr = '';
//        
//        document.getElementById(selectedSpan).className= 'default';
//        selectedTr = '';
//        
//    }
//    obj.style.display = '';
//    selectedValue = "document.getElementById('"+ obj.id +"')";
//    
//    document.getElementById(TrId).style.backgroundColor = '#fbf6f3';
//    selectedTr = TrId;
//    
//    document.getElementById(spanId).className= 'purple';
//    selectedSpan = spanId;
    
//}

