function NewWindow(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=yes';

	var nwin = window.open(mypage, myname, winprops);

	if (parseInt(navigator.appVersion) >= 4) 
	{ 
		if( nwin && nwin.open && !nwin.closed )
		{
			nwin.window.focus();
		}
	}
	return nwin;
}

function ContentEditor(sPage)
{		
	sQuery = '?' + 'page=' + sPage;
	
	var sUrlNoProt = document.location.href.substring(document.location.protocol.length + 2);
	var aUrl = sUrlNoProt.split('/');
	
	var sBase = document.location.protocol + "//" + document.location.host;
	if (sBase.indexOf('localhost') > -1)
	    sBase += '/' + aUrl[1];
	    
	win = NewWindow(sBase + "/Admin/ContentEditor.aspx" + sQuery,'content_editor','750','600','yes');
}

