//*********************************************************************************************
// Function: application_name
// parameter: 
// description: returns the application name
//*********************************************************************************************
function application_name(){
   sapplication_title="King Hiram Lodge No. 104";
return(sapplication_title);
}



//*********************************************************************************************
// Function: page_title(spagetitle)
// parameter: 
// description: creates starting table tags
//*********************************************************************************************

function page_title(spagetitle){
	document.writeln("<H2 title=\""+spagetitle+"\">"+spagetitle);
	document.writeln("<HR></H2>");
//	click();
}

//*********************************************************************************************
// Function: set_page_window_title
// parameter: 
// description: returns the application name
//*********************************************************************************************
function set_page_window_title(stitle){
   sapplication_name=application_name();
   click();
//   if (top != self) top.document.title = sapplication_name + "-"+stitle;
   if (top != self)
   {
    top.document.title = sapplication_name + "-"+stitle;
   }
   else
   {
    top.document.title = sapplication_name + "-"+stitle;
   }

}





//*********************************************************************************************
// Function: security_check()
// parameter: 
// description: Redirects if not logged on
//*********************************************************************************************
function security_check(){
//      if (typeof(parent.frames["hidden"]) == 'undefined')
//      {
//         alert("parent.frames[hidden] = Undefined");
//      }
//      else
//      {
//         alert("parent.frames[hidden] = Defined");
//      };
	
      if (top.location.href == self.location.href){
	self.location.href = "restricted.htm";
	return;
      };   


      if (typeof(parent.frames["hidden"].document.forms["access"]) == 'undefined')
      {
//         alert("parent.frames[hidden].document.forms[access] is Undefined");
         self.document.location.href = "accessdenied.htm";
      }
      else
      {
//         alert("parent.frames[hidden].document.forms[access] is Defined");
      };
   
      if (typeof(parent.frames["hidden"].document.forms["access"]) != 'undefined')
      {
         if (parent.frames["hidden"].document.forms["access"].indicator.value!="true")
         {
            self.document.location.href = "accessdenied.htm";
         }
         else
         {
//          alert("HI");
         };
       }
       else
       {
            self.document.location.href = "accessdenied.htm";
       };

 }

//*********************************************************************************************
// Function: hidden_security_check()
// parameter: 
// description: Redirects if not logged on
//*********************************************************************************************
function hidden_security_check(){
   if (form.indicator.value!="true")
   {
//      alert("Indicator = True");
//      self.document.location.href = "accessdenied.htm";
//
   };
//   else
//   {
//      alert("HI");
//   };
}

function click(e)
{
var message=""; 
/////////////////////////////////// 
function clickIE() {if (document.all) {(message);return false;}} 
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) { 
if (e.which==2||e.which==3) {(message);return false;}}} 
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} 
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} 

document.oncontextmenu=new Function("return false") ;
}

//<!-- Hide script from old browsers -- 

function clicki(e) 
{
var message="Copyright Protected"; 
if (document.all) {if (event.button == 2) {
//if (document.all) {if (event.button == 2) {alert(message); 
//return false;}}if (document.layers) {if (e.which == 3) {alert(message); 
return false;}}if (document.layers) {if (e.which == 3) {
return false;}}}if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);} 
document.onmousedown=click;

// --> 


