function login(pstrContinueURL) {
	comsOpenPopupSize("/ict_login.jsp?LoginContinueURL="+pstrContinueURL, "ICTLogin", 350, 275, "no", "no", "no", "no");
	/*if (navigator.appName == 'Microsoft Internet Explorer') {
		window.open("/ict_login.jsp?LoginContinueURL="+pstrContinueURL,"login", "directories=no, location=no, scrollbars=no, menubar=no, resizable=no, status=no, toolbar=no, height=270, width=350, top=50, left=75");
	} else {
		loginwindow=window.open('/ict_login.jsp?LoginContinueURL='+pstrContinueURL,'login','resizable,scrollbars,height=275,width=350');
	}*/
} 

function isCookiesEnabled () {  
  var pdatNow = new Date();
  var pstrCookie = "CMSTestCookie=" + pdatNow;
  var pstrRetrievedCookie = "";

  document.cookie = pstrCookie;
  pstrRetrievedCookie = document.cookie;

  if (pstrRetrievedCookie == null) {
    return false;
  }

  if (pstrRetrievedCookie == "") {
    return false;
  }

  if (pstrRetrievedCookie.indexOf(pstrCookie) > -1) {     
    return true;
  }

  return false;
}	

function comsOpenPopupSize(pstrURL, pstrWindowName, pintWidth, pintHeight, pstrResize, pstrScroll, pstrMenuBar, pstrToolBar) {
	var pobjWindow, pintTop, pintLeft, pstrNNResize="", pstrNNScroll="";
	
	pintTop = (screen.availHeight/2-(pintHeight/2));
	pintLeft = (screen.availWidth/2-(pintWidth/2));

	if (pintWidth>screen.availWidth*0.95) {
		pintWidth=screen.availWidth*0.95;
	}
	if (pintHeight>screen.availHeight*0.95) {
		pintHeight=screen.availHeight*0.95;
	}

	if (pstrResize == 'yes'){
		pstrNNResize = 'resizable';
	}
	else {
		pstrNNResize = '';
	}

	if (pstrScroll == 'yes'){
		pstrNNScroll = 'scrollable';
	}
	else {
		pstrNNScroll = '';
	}
	
	if (navigator.appName == 'Microsoft Internet Explorer') {
		pobjWindow = window.open(pstrURL, pstrWindowName, "directories=yes, location=no, menubar="+pstrMenuBar+", resizable="+ pstrResize +", scrollbars="+ pstrScroll +", status=no, toolbar="+pstrToolBar+", height="+pintHeight+", width="+pintWidth+",top="+pintTop+",left="+pintLeft);
	}	
	else {
		pobjWindow = window.open(pstrURL,pstrWindowName,pstrNNResize+","+pstrNNScroll+",height="+pintHeight+", width="+pintWidth);
	}
	pobjWindow.focus();
}

function displayMovie(pstrFile, pstrTemplate) {
	var inner_window_width=600;
	var inner_window_height=500;
	var shell_window_top=(window.screen.availHeight/2)-(inner_window_height/2);
	var shell_window_left=(window.screen.availWidth/2)-(inner_window_width/2);
	
	shell_window_top = shell_window_top - 150;
	 
	ViewMovieWindow = window.open('/'+pstrTemplate+'?File=' + pstrFile,'ViewMovieWindow','top='+shell_window_top+',left='+shell_window_left+',width='+inner_window_width+', height='+inner_window_height+',status=no, menubar=no, scrollbars=yes, copyhistory=no, resizable=yes');

}	
