function UTCClock() {
  updt = window.setTimeout ("UTCClock()",100);
  var digital = new Date();
  var month = digital.getUTCMonth() + 1;
  var day = digital.getUTCDate();
  var year = digital.getUTCFullYear();
  var hours = digital.getUTCHours();
  var minutes = digital.getUTCMinutes();
  var seconds = digital.getUTCSeconds();
  if (hours == 0) hours = "00";
  if (minutes <= 9) minutes = "0" + minutes;
  if (seconds <= 9) seconds = "0" + seconds;
  dispTime = month + "/" + day + "/" + year + "  " + hours + ":" + minutes + ":" + seconds + " " + "UTC";
  document.getElementById('HHMMSS').value = " " + dispTime;
}

function membership_rollin(id) {
  document.getElementById('default').style.display = 'none';
  document.getElementById('free').style.display = 'none';
  document.getElementById('basic').style.display = 'none';
  document.getElementById('premium').style.display = 'none';
  document.getElementById('premium_plus').style.display = 'none';
  document.getElementById(id).style.display = 'block';
}

function membership_rollout() {
  document.getElementById('free').style.display = 'none';
  document.getElementById('basic').style.display = 'none';
  document.getElementById('premium').style.display = 'none';
  document.getElementById('premium_plus').style.display = 'none';
  document.getElementById('default').style.display = 'block';
}

function dismiss(id,cookieName){
  document.getElementById (id).style.display = "none";
  var thisdate = new Date();
  thisdate = thisdate.getMonth()+1 + '/' + thisdate.getDate() + '/' + thisdate.getFullYear();
  var expdate = new Date();
  expdate.setTime(expdate.getTime() + 1000 * 60 * 60 * 24 * 365);
  document.cookie= cookieName + '=' + thisdate + '; expires=' + expdate.toGMTString();
}

function OpenHelpWindow(hID,HelpDirect) {
  var height = 600;
  var width = 250;
  var winl = (screen.width - width);
  var wint = 0;
  HelpWindow=open('http://' + WebAPBaseURL + '/help/help_v2.cfm?hID=' + hID + '&HelpDirect=' + HelpDirect,'HelpWindow','top=' + wint + ',left=' + winl + ',width=' + width + ',height=' + height + ',scrollbars=yes,resizable=yes,');
  HelpWindow.focus();
}

function ap_ExpMenu(){
 if(navigator.appVersion.indexOf("MSIE")==-1){return;}
 var i,k,g,lg,r=/\s*aphvr/,nn='',c,cs='aphvr',bv='apmenubar';
 for(i=0;i<10;i++){g=document.getElementById(bv+nn);if(g){
 lg=g.getElementsByTagName("LI");if(lg){for(k=0;k<lg.length;k++){
 lg[k].onmouseover=function(){c=this.className;cl=(c)?c+' '+cs:cs;
 this.className=cl;};lg[k].onmouseout=function(){c=this.className;
 this.className=(c)?c.replace(r,''):'';};}}}nn=i+1;}
}

var submitted = false;
function showGenProgress(){
	if (! submitted){
		submitted = true;
    document.getElementById('genOverlay').style.display='block';
    document.getElementById('genProgress').style.display='block';
		genActivityImg = document.getElementById('genActivity');
    setTimeout("genActivityImg.src = genActivityImg.src",100);
		return true;
  }else{
		return false;
  }
}