function DoLogout() {
	document.location.href='/api/logout/';
}
function DoLogin() {
	if (SYS_BXI_blnChallengeResponsePrimary) {
		if (objCurrentPage.indexOf("abdicate=true")==-1) {
			var objAddtionalURL;
			if (objCurrentPage.indexOf("?")!=-1) {
				objAddtionalURL = '&abdicate=true'
			} else {
				objAddtionalURL = '?abdicate=true'
			}
			document.location.href=objCurrentPage+objAddtionalURL;
		} else {
			document.location.href=objCurrentPage;
		}
	} else{
		document.location.href='/api/login/';
	}	
}
function AddNews(txtNewsType,txtLocation,intID) {
	popup('/modules/newsmanager/wizard/wizard.asp?type='+txtNewsType+'&txtLocation='+txtLocation+'&intID='+intID,500,700)
}
function AddBasicNews(txtNewsType,txtLocation,intID) {
	popup('/modules/newsmanager/wizard/basicwizard.asp?type='+txtNewsType+'&txtLocation='+txtLocation+'&intID='+intID,500,700)
}
function ShowSOModel(iURL,width,height) {
	lPos = (screen.width)/2 -(width/2);
	tPos = (screen.height)/2 -(height/2);
	window.showModalDialog(iURL,window,"dialogLeft:"+lPos+";dialogTop:"+tPos+"; dialogHeight: "+height +"px; dialogWidth: "+width+"px; edge: Raised; center: Yes; help: no; resizable: yes; status: no;");
}	
function popup(popupfile,winheight,winwidth) {
	lPos = (screen.width)/2 -(winwidth/2);
	tPos = (screen.height)/2 -(winheight/2);
	open(popupfile,"PopupWindow","resizable=no,height=" + winheight + ",width=" + winwidth + ",left="+lPos+",top="+tPos+",scrollbars=no");
}
function popUpPage(popupfile,winheight,winwidth) {
	lPos = (screen.width)/2 -(winwidth/2);
	tPos = (screen.height)/2 -(winheight/2);

	open(popupfile,"PopupWindow","resizable=no,height=" + winheight + ",width=" + winwidth + ",left="+lPos+",top="+tPos+",status=no,scrollbars=yes,toolbar=yes,resizable=yes,menubar=yes");
}
function doHeader(intID,intExecute,intWidth,intHeight,intResize) {

	if ((intExecute == "") || (intExecute == 1))	
	{
		window.open('/api/redirect/header.asp?id='+intID);
	}
	if (intExecute == 2)
	{
		window.open('/api/redirect/external.asp?txtName=&txtURL=/api/redirect/header.asp?id='+intID);
	}
	if (intExecute == 3)
	{
		var selection = '/api/redirect/header.asp?id='+intID;
    		if (selection != "None") {
        location.href = selection;
        return false;
   	}
		//location.href('/api/redirect/header.asp?id='+intID);
		//document.location.href('/api/redirect/header.asp?id='+intID);
	}	
	if (intExecute == 4)
	{
		document.location.href('/api/redirect/external.asp?txtName=&txtURL=/api/redirect/header.asp?id='+intID);
	}
	if (intExecute == 5)
	{	
		lPos = (screen.width)/2 -(intWidth/2);
		tPos = (screen.height)/2 -(intHeight/2);		

		open('/api/redirect/header.asp?id='+intID,'PopupWindow','resizable=' + intResize + ',height=' + intHeight + ',width='+ intWidth +',left='+lPos+',top='+tPos+'');
	}

}
function doLink(intID,intExecute,intWidth,intHeight,intResize) {
	if ((intExecute == "") || (intExecute == 1))	
	{
		window.open('/api/redirect/bookmark.asp?id='+intID);
	}
	if (intExecute == 2)
	{
		window.open('/api/redirect/external.asp?txtName=&txtURL=/api/redirect/bookmark.asp?id='+intID);
	}
	if (intExecute == 3)
	{
		document.location.href('/api/redirect/bookmark.asp?id='+intID);
	}	
	if (intExecute == 4)
	{
		document.location.href('/api/redirect/external.asp?txtName=&txtURL=/api/redirect/bookmark.asp?id='+intID);
	}
	if (intExecute == 5)
	{	
		lPos = (screen.width)/2 -(intWidth/2);
		tPos = (screen.height)/2 -(intHeight/2);		

		open('/api/redirect/bookmark.asp?id='+intID,'PopupWindow','resizable=' + intResize + ',height=' + intHeight + ',width='+ intWidth +',left='+lPos+',top='+tPos+'');
	}
}