//*****************************************************************************************
//* 	Declare vairables
//*****************************************************************************************
			
var head="display:''"

//*****************************************************************************************
//* Function: 			MainLine
//* Passed Values:		None
//*	Returned Value:		None
//*	Purpose:			The top of all JavaScrips
//*****************************************************************************************
function getMainLine() {
}


//*****************************************************************************************
function getSelector() {
    document.forms[0].submit();
}
//*****************************************************************************************
function getSelectorOld() {
    var result;
    var newPicWidow;
    newPicWindow = frmSelectorList.cboFunctionName.value;
    if (newPicWindow > "") {
//     OpenWindow(newPicWindow,'MDHA','titlebar=no,scrollbars=yes,resizable=yes,menubar=no,directories=no;innerWidth=850,innerHeight=570,width=850,height=570,top=1,left=1;');
       OpenWindow(newPicWindow,'MDHA','scrollbars=no,toolbar=no,titlebar=no,resizable=no,menubar=no,directories=no,width=600px,height=150px,top=100,left=100;');
    }
    return;
}
//*****************************************************************************************
function getPicture200(strPathPicture)
{
    var result;
    window.showModalDialog("getPicture.asp?PATHPIC="+strPathPicture,"","dialogHeight:650px;dialogWidth:700px;center:Yes;status:No;help:No;");
    return;
}
//*****************************************************************************************
function getPictureMembersOnly(strPathPicture)
{
    var result;
//  window.showModalDialog("getPicture.asp?PATHPIC="+strPathPicture,"","dialogHeight:650px;dialogWidth:700px;center:Yes;status:Yes;help:No;");
    OpenWindow(strPathPicture,'MDHA','scrollbars=yes,toolbar=yes,titlebar=yes,resizable=yes,menubar=yes,directories=yes,width=700px,height=650px,top=100,left=100;');
    return;
}
//*****************************************************************************************
//*   Function:				getLargerView
//*   Passed Values:		path and file name
//*	  Returned Value:		none
//*	  Purpose:				new window to show picture
//*****************************************************************************************
function getPicture(strPathPicture)
{
    var result;
    var newPicWidow;
    newPicWindow = "getPicture.asp?PATHPIC="+strPathPicture;
    OpenWindow(newPicWindow,'Pictures','titlebar,scrollbars,resizable,menubar,directories=yes;innerWidth=720,innerHeight=550,width=720,height=550');	
    return;
}
//*****************************************************************************************
//*   Function:				getNewWindow
//*   Passed Values:		wiindow name
//*	  Returned Value:		none
//*	  Purpose:				new window
//*****************************************************************************************
function getModalWindow(strWindowName)
{
    var resultWin;
    returnWin =  window.showModalDialog(strWindowName,"","dialogHeight:300px;dialogWidth:400px;center:Yes;status:No;help:No;");
    return returnWin;
}
//*****************************************************************************************
//*   Function:				getNewWindow
//*   Passed Values:		wiindow name
//*	  Returned Value:		none
//*	  Purpose:				new window
//*****************************************************************************************
function getNewWindow(strWindowName)
{
    var result;
	window.showModalDialog(strWindowName,"","dialogHeight:300px;dialogWidth:400px;center:Yes;status:No;help:No;");
    return;
}
//*****************************************************************************************
//*   Function:				getNewWindow
//*   Passed Values:		wiindow name
//*	  Returned Value:		none
//*	  Purpose:				new window
//*****************************************************************************************
function OpenWindow (URL, WinName, Features) {  
     window.open(URL, WinName, Features);
}
//*****************************************************************************************
function getClose() {
    window.close();
}




//*****************************************************************************************
//* 	Function:					PutCookieVisits
//*   Passed Values:		none
//*		Returned Value:		none
//*		Purpose:					Given cookie, return visit attributes
//*****************************************************************************************
function PutCookieVisits(name)
  {
   var expdate = new Date();
   var visits;

   expdate.setTime(expdate.getTime() +  (48 * 60 * 60 * 1000 * 365));

   if(!(visits = GetCookie(name)))
        visits = 0;
   visits++;

   SetCookie(name, visits, expdate, "/", null, false);

   document.write("<td class='white8' align='center'>Your Visits:<td class='gold8' align='center'>" + visits + " ");
  }
//*****************************************************************************************
//* 	Function:					PutCookieMenuOption
//*   Passed Values:		DirPath, MenuItem
//*		Returned Value:		none
//*		Purpose:					Given cookie, return visit attributes
//*****************************************************************************************
function PutCookieMenuOption(DirPath, MenuItem)
  {
   var DirPathName;
   var MenuOption;
   var expdate = new Date();
   expdate.setTime(expdate.getTime() +  (48 * 60 * 60 * 1000 * 365));

   if(!(MenuOption = GetCookie("MenuOption")))
	{   MenuItemAgain = "whatMenuItem";}

   SetCookie("MenuOption", MenuItem, expdate, "/", null, false);
   
   if(!(DirPathName = GetCookie("DirPathName")))
	{   DirPathAgain = "whatPathDir";}

   SetCookie("DirPathName", DirPath, expdate, "/", null, false);

  }
//*****************************************************************************************
//* 	Function:					GetCookie
//*   Passed Values:		userName
//*		Returned Value:		none
//*		Purpose:					Gets cooie and its attributes
//*****************************************************************************************
function GetCookie (name)
 {
   var arg  = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i    = 0;

   while (i < clen)
    {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
          return GetCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0)
          break;
    }
   return null;
  }
//*****************************************************************************************
//* 	Function:					SetCookie
//*   Passed Values:		userName, escape value
//*		Returned Value:		none
//*		Purpose:					Sets cookie attributes
//*****************************************************************************************
function SetCookie (name, value)
  {
   var argv    = SetCookie.arguments;
   var argc    = SetCookie.arguments.length;

   var expires = (2 < argc) ? argv[2] : null;
   var path    = (3 < argc) ? argv[3] : null;
   var domain  = (4 < argc) ? argv[4] : null;
   var secure  = (5 < argc) ? argv[5] : false;

   document.cookie = name + "=" + escape (value) +
     ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
     ((path    == null) ? "" : ("; path=" + path)) +
     ((domain  == null) ? "" : ("; domain=" + domain)) +
     ((secure  == true) ? "; secure" : "");
  }
//*****************************************************************************************
//* 	Function:					GetCookieVal
//*   Passed Values:		Starting ocation of cookie attribute
//*		Returned Value:		attribute value
//*		Purpose:					Sets an returns attribute value
//*****************************************************************************************
function GetCookieVal (offset)
  {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1)
       endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
  }
//*****************************************************************************************
//* 	Function:					GetTime
//*   Passed Values:		none
//*		Returned Value:		none
//*		Purpose:					Show Nailed Bug 
//*****************************************************************************************
function GetCurrTime()
  {
   today = new Date();
  
   if(today.getMinutes() < 10)
     {pad = "0"}
   else
      pad = ""; 

   document.write("<table align='center'><tr><td class='white8' align='center'>"+today+"</table>");
  }
