function system_InnerHTML(div, sText) {
	div.open();
	div.write(sText);
	div.close();
}

function system_LocalizeText(sText, arr) {
  var iNum;
  var sNewText = sText;
  for (var i=0; i<arr.length; i++) {
    iNum = i + 1;
    sNewText = system_ReplaceCharInString(sNewText, "#" + iNum + "#", arr[i], 0);
  }
  return sNewText;
}

function system_SetDateToXML(dtDate) {
		if (dtDate == "") {
			return "";
		}

		var dt = new Date(dtDate);
	
		sYr = dt.getFullYear();
		sMo = dt.getMonth() + 1;
		if (sMo < 10) {
			sMo = "0" + sMo;
		}
		sDt = dt.getDate();
		if (sDt < 10) {
			sDt = "0" + sDt;
		}
		sHr = dt.getHours();
		if (sHr < 10) {
			sHr = "0" + sHr;
		}
		sMi = dt.getMinutes();
		if (sMi < 10) {
			sMi = "0" + sMi;
		}
		sSe = dt.getSeconds();
		if (sSe < 10) {
			sSe = "0" + sSe;
		}
		return sYr + "/" + sMo + "/" + sDt + " " + sHr + ":" + sMi + ":" + sSe;
}

function system_CheckDate(strDate,strFormat){
	var intMonth;
	var intDay;
	var intYear;
	oDate = null;
	var arrDate = strDate.split("/");
	if (arrDate.length != 3)
	{
		return null;
	}

	for (var i=0;i<3;i++)
	{
		if (isNaN(arrDate[i]))
		{
			return null;
		}
	}

	switch(strFormat.toUpperCase())
	{
		case "MM/DD/YYYY":
			intMonth = arrDate[0];
			intDay = arrDate[1];
			intYear = arrDate[2]
			if (intYear<1000||intYear>9999)
			{
				return null;
			}							
			break;
		case "YYYY/MM/DD":
			intMonth = arrDate[1];
			intDay = arrDate[0];
			intYear = arrDate[2]
			if (intYear<1000||intYear>9999)
			{
				return null;
			}							
			break;
		case "DD/MM/YYYY":
			intMonth = arrDate[1];
			intDay = arrDate[2];
			intYear = arrDate[0]
			if (intYear<1000||intYear>9999)
			{
				return null;
			}							
			break;
		default:
			intMonth = arrDate[0];
			intDay = arrDate[1];
			intYear = arrDate[2]
	}
	
	if (intMonth<1 || intMonth>12)
	{
		return null;
	}
	if (intDay<1 || intDay>31)
	{
		return null;
	}
	if (intYear<0)
	{
		return null;
	}
	var oDate = new Date(intYear,intMonth - 1,intDay)
	if (oDate.getDate()!=intDay)
	{
		return null;
	}
	intMonth = intMonth -1;
	if (oDate.getMonth()!=intMonth)
	{
		return null;
	}

	if (oDate.getYear()!=intYear & oDate.getFullYear()!=intYear)
	{
		return null;
	}
	return oDate;
}

function system_GetDateFormat(oDate,strFormat){
var strRetVal = "";
	var intDay = oDate.getDate();
	var intMonth = oDate.getMonth()+1;
	var intYear = oDate.getFullYear();
	switch(strFormat.toUpperCase())
	{
		case "MM/DD/YYYY":
			strRetVal = intMonth + "/" + intDay + "/" + intYear;
			break;
		case "YYYY/MM/DD":
			strRetVal = intYear + "/" + intMonth + "/" + intDay;
			break;
		case "DD/MM/YYYY":
			strRetVal = intDay + "/" + intMonth + "/" + intYear;
			break;
		default:
			strRetVal = intMonth + "/" + intDay + "/" + intYear;
	}
	return strRetVal;
}

function system_GetApplicationDateFormat()
{
	if (COMMON_DATE_FORMAT!="DD/MM/YYYY" && COMMON_DATE_FORMAT!="MM/DD/YYYY")
	{
		return "MM/DD/YYYY";
	}
	return COMMON_DATE_FORMAT;
}

function system_GetXMLSignOut(strIn){
var strRetVal  = strIn;
var intNumber= 0;
strRetVal = system_ReplaceCharInString(strRetVal,"&","&amp;",intNumber);
strRetVal = system_ReplaceCharInString(strRetVal,"<","&lt;",intNumber);
strRetVal = system_ReplaceCharInString(strRetVal,">","&gt;",intNumber);
//strRetVal = system_ReplaceCharInString(strRetVal,"'","&apos;",intNumber);
strRetVal = system_ReplaceCharInString(strRetVal,'"',"&quot;",intNumber);

return strRetVal;
}

function system_GetXMLSignIn(strIn){
var strRetVal  = strIn;
var intNumber= 0;
strRetVal = system_ReplaceCharInString(strRetVal,"&amp;","&",intNumber);
strRetVal = system_ReplaceCharInString(strRetVal,"&lt;","<",intNumber);
strRetVal = system_ReplaceCharInString(strRetVal,"&gt;",">",intNumber);
//strRetVal = system_ReplaceCharInString(strRetVal,"&apos;","'",intNumber);
strRetVal = system_ReplaceCharInString(strRetVal,"&quot;",'"',intNumber);

return strRetVal;
}


function system_ReplaceCharInString(parmStr,parmStrToFind,parmStrToReplace,intNumber){
	intNumber = 0;
	var strBase = "" + parmStr;
	var strRes="";
	var intPos = strBase.search(parmStrToFind);
	if (intPos==-1)
		{
		return parmStr;
		}
	while (intPos>-1)
		{
		intNumber++;
		strRes = strRes + strBase.substr(0,intPos) + parmStrToReplace;
		strBase = strBase.substr(intPos + parmStrToFind.length);
		intPos = strBase.search(parmStrToFind);
		if (intPos==-1)
			{
			strRes = strRes + strBase;
			}
		}
	return strRes;
}

function system_Trim(sString) {
	var sNew = new String(sString);
	if (sNew == "")
	{
		return "";
	}
//	try {
		while(sNew.charAt(0) == " ") {
			sNew = sNew.substring(1, sNew.length);		
		}
		while(sNew.charAt(sNew.length-1) == " ") {
			sNew = sNew.substring(0, sNew.length-1);		
		}
		return sNew;
	//}
	//catch(e) {
	//	alert("Error at system_Trim: " + e.description);
	//	return "";
	//}
}

function system_GetDateFromXML(strDate,strFormatType,bGetTime){
	var intYear;
	var intMonth;
	var intDay;
	var intHours;
	var intMinutes;
	var intSeconds;
	if (strDate.length<10)
		{
		return "";
		}
	intYear = strDate.substring(0,4);
	intMonth  = strDate.substring(5,7)-1;
	intDay  = strDate.substring(8,10);
	if ((bGetTime) && (strDate.length==19))
		{
		intHours = strDate.substring(11,13);
		intMinutes = strDate.substring(14,16);
		intSeconds = strDate.substring(17,19);
		var dateObj = new Date(intYear, intMonth, intDay, intHours, intMinutes, intSeconds);
		}
	else
		{
		var dateObj = new Date(intYear, intMonth, intDay)
		}
	var strRetval="";
	switch (strFormatType)
		{
		case "TEXT":
			switch(intMonth)
				{
				case 0:
					intMonth = CALENDAR_JANUARY_SHORT;
					break
				case 1:
					intMonth = CALENDAR_FEBRUARY_SHORT;
					break
				case 2:
					intMonth = CALENDAR_MARCH_SHORT;
					break
				case 3:
					intMonth = CALENDAR_APRIL_SHORT;
					break
				case 4:
					intMonth = CALENDAR_MAY_SHORT;
					break
				case 5:
					intMonth = CALENDAR_JUNE_SHORT;
					break
				case 6:
					intMonth = CALENDAR_JULY_SHORT;
					break
				case 7:
					intMonth = CALENDAR_AUGUST_SHORT;
					break
				case 8:
					intMonth = CALENDAR_SEPTEMBER_SHORT;
					break
				case 9:
					intMonth = CALENDAR_OCTOBER_SHORT;
					break
				case 10:
					intMonth = CALENDAR_NOVEMBER_SHORT;
					break
				case 11:
					intMonth = CALENDAR_DECEMBER_SHORT;
					break
				default:
				}
				strRetval = intDay + " " + intMonth  + " " + intYear;
				return strRetval;
			break;
		case "DD/MM/YYYY":
			intMonth++;
			strRetval = intDay + "/" + intMonth + "/" + intYear
			if (bGetTime)
			{
				strRetval = strRetval + " " + intHours + ":" + intMinutes + ":" + intSeconds;
			}
			return strRetval;
			break;
		case "MM/DD/YYYY":
			intMonth++;
			strRetval =  intMonth + "/" + intDay + "/" + intYear
			if (bGetTime)
			{
				strRetval = strRetval + " " + intHours + ":" + intMinutes + ":" + intSeconds;
			}
			return strRetval;
			break;
		case "DATE":
		default:
			return dateObj.toLocaleString();
		}
}

function system_HTMLSpace(iNumber) {
	sResult = "";
	for (var i=1; i<=iNumber; i++) {
		sResult = sResult + "\xA0";
	}
	return sResult;
}
////TelAviv Part
var system_oLoginWindow = null;
function system_Login(o_Parameter, o_bGuestEnable, o_bSessionExpired)
{
	if(!system_IsCookiesEnabled())
	{
		alert(COMMON_TEXT_NETSCAPE_MUST_ENABLE_COOKIES);
		return false;
	}
	if (system_Login.arguments.length < 2)
	{
		var bGuestEnable = "";
	}
	else
	{
		var bGuestEnable = o_bGuestEnable;
	}
	if (system_Login.arguments.length < 3)
	{
		var bSessionExpired = 1;
	}
	else
	{
		var bSessionExpired = o_bSessionExpired;
	}
	system_LoginReal(bGuestEnable, bSessionExpired);
	//window.setTimeout("system_LoginReal('" + bGuestEnable + "', " + bSessionExpired + ")",50);
	return false;
}
function system_LoginReal(bGuestEnable, bSessionExpired)
{
	var strURL = "LoginCI_NS.asp?GuestEnable=" + bGuestEnable + "&SessionExpired=" + bSessionExpired;
	
	var lWidth = LOGIN_DIMENSIONS_PAGE_WIDTH_NS;
	var lHeight = LOGIN_DIMENSIONS_PAGE_HEIGHT_NS;
	if (bSessionExpired == 1)
	{
		lWidth = LOGIN_DIMENSIONS_PAGE_WIDTH_SESSION_EXPIRED_NS;
		lHeight = LOGIN_DIMENSIONS_PAGE_HEIGHT_SESSION_EXPIRED_NS;
	}

	var lTop = (window.screen.availHeight)/2-lHeight/2;
	var lLeft = (window.screen.availWidth)/2-lWidth/2;
	
	var swindowFeatures = "directories=no,location=no,menubar=no,titlebar=no,resizable=no,status=no,toolbar=no,width=" + lWidth + ",height=" + lHeight + ",screenX=" + lLeft + ",screenY=" + lTop;
	system_oLoginWindow = window.open(strURL,"CI_Login",swindowFeatures);
	system_oLoginWindow.focus();
}

function system_LoginUserClosed()
{
	system_oLoginWindow=null;
}

function system_OpenCIWindow(strURL,strWindowName)
{
	var lHeight = window.screen.availHeight - 45;
	var lWidth = window.screen.availWidth - 12;
	var lTop = 0;
	var lLeft = 0;
	var swindowFeatures = "scrollbars=yes,directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no," + 
						"width=" + lWidth +  ",height=" + lHeight + ",screenX=" + lLeft + ",screenY=" + lTop;
	var oWin = window.open(strURL,strWindowName,swindowFeatures);
	oWin.focus();
	return false;
}

function system_OpenPreviewWindow(strURL)
{
	var lHeight = window.screen.availHeight - 45;
	var lWidth = window.screen.availWidth - 12;
	var lTop = 0;
	var lLeft = 0;
	var swindowFeatures = "scrollbars=yes,directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no," + 
						"width=" + lWidth +  ",height=" + lHeight + ",screenX=" + lLeft + ",screenY=" + lTop;
	var oWin = window.open(strURL,"Preview",swindowFeatures);
	oWin.focus();
	return false;
}

var system_oChangePasswordWindow = null;
function system_ChangePassword()
{
	var strURL = "Login_changePassword_NS.asp";
	var lTop = (window.screen.availHeight)/2-110/2;
	var lLeft = (window.screen.availWidth)/2-300/2;

	var swindowFeatures = "directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no,width=350,height=160,screenX=" + lLeft + ",screenY=" + lTop;
	system_oChangePasswordWindow = window.open(strURL,"CIChangePassword",swindowFeatures);
	system_oChangePasswordWindow.focus();
	return false;
}

function system_OpenAddCommentWindow(sGUID)
{
	var strURL = "ArcDocCommentEdit.asp?GUID=" + sGUID;
	var lTop = (window.screen.availHeight)/2-150/2;
	var lLeft = (window.screen.availWidth)/2-300/2;

	var swindowFeatures = "directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no,width=360,height=150,screenX=" + lLeft + ",screenY=" + lTop;
	window.open(strURL,"CIPreferences",swindowFeatures);
	
}

var system_oNLSPreferencesWindow = null;
function system_OpenPreferencesWindow(strGUID)
{
	if(!system_IsCookiesEnabled())
	{
		alert(PREFERENCES_MESSAGE_BOX_YOU_SHOULD_ENABLE_COOKIES)
		return 0;
	}	
	window.setTimeout("system_OpenGeneralPreferencesWindowReal('" + strGUID + "')",50);
	return false;
}

function system_OpenGeneralPreferencesWindowReal(strGUID)
{
	var strURL = "CIPreferences.asp?GUID=" + strGUID;
	var lTop = (window.screen.availHeight)/2-220;
	var lLeft = (window.screen.availWidth)/2-400/2;

	var swindowFeatures = "directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no,width=400,height=235,screenX=" + lLeft + ",screenY=" + lTop;
	system_oNLSPreferencesWindow = window.open(strURL,"CIPreferences",swindowFeatures);
	system_oNLSPreferencesWindow.focus();
	return false;
}

var system_oArchitectPreferencesWindow = null;
function system_OpenArchitectPreferencesWindow(sGUID,bIsArchitectActive,bIsFAQandDiscoverActive)
{
	if(!system_IsCookiesEnabled())
	{
		alert(PREFERENCES_MESSAGE_BOX_YOU_SHOULD_ENABLE_COOKIES)
		return 0;
	}
	window.setTimeout("system_OpenArchitectPreferencesWindowReal('" + sGUID + "'," + bIsArchitectActive + "," + bIsFAQandDiscoverActive + ")",50);
	return false;
}
function system_OpenArchitectPreferencesWindowReal(sGUID,bIsArchitectActive,bIsFAQandDiscoverActive)
{
	var strURL = "ArchitectPreferences.asp?GUID=" + sGUID + "&Architect=" + bIsArchitectActive + "&FAQ="+ bIsFAQandDiscoverActive;
	var width = PREFERENCES_NS_ARCHITECT_DIMENSIONS_PAGE_WIDTH;
	var height = PREFERENCES_NS_ARCHITECT_DIMENSIONS_PAGE_HEIGHT;
	var lTop = (window.screen.availHeight)/2-height;
	var lLeft = (window.screen.availWidth)/2-width/2;
	
	var swindowFeatures = "directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no,width=" + width + ",height=" + height + ",screenX=" + lLeft + ",screenY=" + lTop;
	system_oArchitectPreferencesWindow = window.open(strURL,"CIArchitectPreferences",swindowFeatures);
	system_oArchitectPreferencesWindow.focus();
	return false;
}
function system_OpenDocument(KdId,lCallID)
{
	var strURL = "DocumentBuilder.asp?ExternalCallID=" + lCallID + "&KDID=" + KdId;
	system_OpenCIWindow(strURL,"Document");
	return false;
}

function system_OpenExpert(NodeID,KdId,lCallID)
{
	var strURL = "DTMain.asp?ExternalCallID=" + lCallID + "&NodeId=" + NodeID + "&KdId=" + KdId;
	system_OpenCIWindow(strURL,"Expert");
	return false;
}

function system_OpenSubmitKnowledge(sGUID){
	var lWidth = SUBMIT_KNOWLEDGE_NS_DIMENSIONS_PAGE_WIDTH;
	var lHeight = SUBMIT_KNOWLEDGE_NS_DIMENSIONS_PAGE_HEIGHT;
	var lLeft = (window.screen.availWidth-lWidth)/2;
	var lTop = (window.screen.availHeight-lHeight)/2;
	var swindowFeatures = "directories=no,location=no,menubar=no,resizable=no,status=yes,toolbar=no," + 
						"width=" + lWidth +  ",height=" + lHeight + ",screenX=" + lLeft + ",screenY=" + lTop;

	//var swindowFeatures = 'left=25,top=5,width=730,height=530,menubar=no,toolbar=no,scrollbars=no,resizable=no';
	var oWin  = window.open("ArcDocUser.asp?GUID=" + sGUID,"CI_SubmitKnowledge",swindowFeatures);
	oWin.focus()
	return false;
}

function system_OpenHelp(strFileName, strName, bAddFolderName)
{
	var strURL = "";
	if (system_OpenHelp.arguments.length > 2)
	{
		if (bAddFolderName)
		{
			strURL += "kt/";
		}
	}
	strURL += "help/" + strFileName;
	var wHelp = null;
	var strWindowName = "Help";
	if (system_OpenHelp.arguments.length > 1)
	{
		strWindowName = strName;
	}
	wHelp = window.open(strURL, strWindowName);
	wHelp.focus();
	return false;
}
function system_IsCookiesEnabled()
{
	testValue=Math.floor(1000*Math.random());
	system_SetCookie('AreCookiesEnabled',testValue);
	if (testValue!=system_RetrieveCookie('AreCookiesEnabled'))
		return false;
	else
		return true; 
		
}

function system_SetCookie(strName, strValue)
{
		var dateExpires = new Date(2037, 11, 31);
		document.cookie = strName + "=" + system_Escape(strValue) + "; expires=" + dateExpires.toGMTString() + ";";
}

function system_RetrieveCookie(strName)
{
		var arrCookie = document.cookie.split("; ");
		for (var intCounter = 0; intCounter < arrCookie.length; intCounter++)
		{
			var arrCurrentCookie = arrCookie[intCounter].split("=");
			if (strName.toLowerCase() == arrCurrentCookie[0].toLowerCase())
			{
				return unescape(arrCurrentCookie[1]);
			}
		}
		return "";
}

function system_OpenExBuilder(iNodeId, strTitle,bIsAdmin)
{
	var strURL = "ExBuilderMain_NS.asp?NodeId=" + iNodeId + "&Title=" + system_Escape(strTitle);
	strWindowName = "TreeDesigner";
	var lHeight = window.screen.availHeight - 45;
	var lWidth = window.screen.availWidth - 12;
	var lTop = 0;
	var lLeft = 0;
	var swindowFeatures = "scrollbars=yes,directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no," + 
						"width=" + lWidth +  ",height=" + lHeight + ",screenX=" + lLeft + ",screenY=" + lTop;
	var oWin = window.open(strURL,strWindowName,swindowFeatures);
	oWin.focus();
	return oWin;
}

function system_LoginCloseWin()
{
	if (system_oLoginWindow!=null)
	{
		window.setTimeout("system_LoginSetWinNull()",10);
		system_oLoginWindow.close();
	}
}
function system_LoginSetWinNull()
{
	system_oLoginWindow=null;
}

function system_PreferencesCloseWin()
{

	if (system_oNLSPreferencesWindow!=null)
	{
		window.setTimeout("system_PreferencesSetWinNull()",10);
		system_oNLSPreferencesWindow.close();
	}
}

function system_PreferencesSetWinNull()
{
	system_oNLSPreferencesWindow=null;
}

function system_ArchitectPreferencesCloseWin()
{
	if (system_oArchitectPreferencesWindow!=null)
	{
		window.setTimeout("system_ArchitectPreferencesSetWinNull()",10);
		system_oArchitectPreferencesWindow.close();
	}
}

function system_ArchitectPreferencesSetWinNull()
{
	system_oArchitectPreferencesWindow=null;
}

var system_oZoomWindow = null;
var system_oPreviewWindow = null;

function system_Zoom()
{
	var strURL = "ExBuilderZoom_NS.asp?"
	
	var lTop = (window.screen.availHeight)/2-535/2;
	var lLeft = (window.screen.availWidth)/2-750/2;
	
	var swindowFeatures = "directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no," + 
						"width=750,height=535" + ",screenX=" + lLeft + ",screenY=" + lTop;
	
	system_oZoomWindow = window.open(strURL,"Zoom",swindowFeatures);
	system_oZoomWindow.focus();
}

function system_Preview(strText, iResponsesNumber,
						strResponse1, strResponse2, strResponse3, strResponse4,
						strResponse5, strResponse6, strResponse7)
{
	var strURL;
	var strResponse;
	strURL = "ExBuilderPreviewFrames_NS.asp";
	strURL += "?Text=" + system_Escape(strText);
	if (system_Preview.arguments.length > 1)
	{
		strURL += "&ResponsesNumber=" + iResponsesNumber;
		for (var iRespNumber = 1; iRespNumber <= iResponsesNumber; iRespNumber++)
		{
			switch (iRespNumber)
			{
				case 1:
					strResponse = strResponse1;
					break;
				case 2:
					strResponse = strResponse2;
					break;
				case 3:
					strResponse = strResponse3;
					break;
				case 4:
					strResponse = strResponse4;
					break;
				case 5:
					strResponse = strResponse5;
					break;
				case 6:
					strResponse = strResponse6;
					break;
				case 7:
					strResponse = strResponse7;
					break;
			}
			strURL += "&Response" + parseInt(iRespNumber) + "=" + system_Escape(strResponse);
		}
	}
	
	var lTop = (window.screen.availHeight)/2-515/2;
	var lLeft = (window.screen.availWidth)/2-680/2;
	
	var swindowFeatures = "directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no,scrollbars=yes," + 
						"width=680,height=515" + ",screenX=" + lLeft + ",screenY=" + lTop;
	system_oPreviewWindow = window.open(strURL,"Preview",swindowFeatures);
	system_oPreviewWindow.focus();
}

function system_CloseZoom()
{
	if (system_oZoomWindow != null)
	{
		window.setTimeout("system_ZoomSetWinNull()", 10);
		system_oZoomWindow.close();
	}
}

function system_ClosePreview()
{
	if (system_oPreviewWindow != null)
	{
		window.setTimeout("system_PreviewSetWinNull()", 10);
		system_oPreviewWindow.close();
	}
}

function system_ZoomSetWinNull()
{
	system_oZoomWindow = null;
}

function system_PreviewSetWinNull()
{
	system_oPreviewWindow = null;
}

function system_ZoomSetWin(oWindow)
{
	system_oZoomWindow = oWindow;
}

function system_PreviewSetWin(oWindow)
{
	system_oPreviewWindow = oWindow;
}

var system_objOpenSearchUsersWindow = null;
function system_OpenSearchUsersWindow(sGUID, strTitle)
{
	if (system_OpenSearchUsersWindow.arguments.length > 1)
	{
		var strTitleParameter = strTitle;
	}
	else
	{
		var strTitleParameter = "";
	}
	
	var strURL = "SearchUsers.asp?GUID=" + sGUID + "&Title=" + system_Escape(strTitleParameter);
	var width = SEARCH_USERS_NS_DIMENSIONS_PAGE_WIDTH;
	var height = SEARCH_USERS_NS_DIMENSIONS_PAGE_HEIGHT;
	
	var lTop = (window.screen.availHeight)/2-height/2;
	var lLeft = (window.screen.availWidth)/2-width/2;
	
	var swindowFeatures = "directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no,width=" + width + ",height=" + height + ",screenX=" + lLeft + ",screenY=" + lTop;
	system_objOpenSearchUsersWindow = window.open(strURL,"SearchUsers",swindowFeatures);
	system_objOpenSearchUsersWindow.focus();
	return false;
}

function system_OpenConfirmWindow(strURL)
{
	var width = CONFIRM_NS_DIMENSIONS_PAGE_WIDTH;
	var height = CONFIRM_NS_DIMENSIONS_PAGE_HEIGHT;
	
	var lTop = (window.screen.availHeight)/2-height/2;
	var lLeft = (window.screen.availWidth)/2-width/2;
	
	var sFeatures = "directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no,width=" + width + ",height=" + height + ",screenX=" + lLeft + ",screenY=" + lTop;
	window.open(strURL,"Workflow",sFeatures)
}
function system_OpenRejectWindow(strURL)
{
	var width = REJECT_NS_DIMENSIONS_PAGE_WIDTH;
	var height = REJECT_NS_DIMENSIONS_PAGE_HEIGHT;
	
	var lTop = (window.screen.availHeight)/2-height/2;
	var lLeft = (window.screen.availWidth)/2-width/2;
	
	var sFeatures = "directories=no,location=no,menubar=no,resizable=no,status=no,toolbar=no,width=" + width + ",height=" + height + ",screenX=" + lLeft + ",screenY=" + lTop;
	window.open(strURL,"Workflow",sFeatures)
}
function system_UploadFile(strFolderName,nImageOnly,bIsAdmin,sCaption,bModalWin)
{
	var lLeft = (window.screen.availWidth)/2-150;
	var lTop = (window.screen.availHeight)/2;	
	var sFeatures= "top=" + lTop + ",left=" + lLeft + ",Width=390px,Height=160px,resizable=no,status=yes,help=no"
	var sURL="CIUploadFileDlg.asp?Folder=" + strFolderName + "&ImageOnly=" + nImageOnly + "&Admin=" + bIsAdmin
	window.open(sURL,null,sFeatures);		

}

function system_OpenAbout(bIE5,folderURL)
{
	strfolderURL = ""
	if (system_OpenAbout.arguments.length>1)
	{
		strfolderURL = folderURL
	}
	
	var lHeight = 310;
	var lWidth = 415;
	var lTop = (window.screen.availHeight)/2-lHeight/2;
	var lLeft = (window.screen.availWidth)/2-lWidth/2;
	if (lTop<0)
		lTop=0;
	if (lLeft<0)
		lLeft=0;
	
	var strURL =strfolderURL + "About_Box.asp";
	var sWindowFeatures = "top=" + lTop + ",left=" + lLeft + ",width=" + lWidth + ",height=" + lHeight + ",menubar=no,toolbar=no,scrollbars=no,resizable=no,status=no";
	window.open(strURL, "KTAbout", sWindowFeatures);
	return false;
}

