
function hmFlash()
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="897" height="290"><param name="movie" value="../flash/home.swf"><param name="quality" value="high"><embed src="../flash/home.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="897" height="290"></embed></object>');
}


function hmLocation()
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="213" height="147"><param name="movie" value="../flash/location.swf" /><param name="quality" value="high" /><embed src="../flash/location.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="213" height="147"></embed></object>');
}


<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->


function initScrollLayer() {
  // arguments: id of layer containing scrolling layers (clipped layer), id of layer to scroll, 
  // if horizontal scrolling, id of element containing scrolling content (table?)
  var wndo = new dw_scrollObj('wn', 'lyr1');
  
  // bSizeDragBar set true by default (explained at www.dyn-web.com/dhtml/scroll/ )
  // wndo.bSizeDragBar = false;
  
  // arguments: dragBar id, track id, axis ("v" or "h"), x offset, y offset
  // (x/y offsets of dragBar in track)
  wndo.setUpScrollbar("dragBar", "track", "v", 1, 1);
  
  // pass id('s) of scroll area(s) if inside table(s)
  // i.e., if you have 3 (with id's wn1, wn2, wn3): dw_scrollObj.GeckoTableBugFix('wn1', 'wn2', 'wn3');
  dw_scrollObj.GeckoTableBugFix('wn'); 
  
  // sometimes ns6+ needs extra help to position correctly
  // dw_scrollObj.rePositionGecko(); 
}


/**************************************************************
 check: Returns the number of minutes between two dates.

 Parameters:
    - Date1: object[form element]
    - Date2: Type[validation type]

 Returns: False / True
***************************************************************/

function check(obj, Allow)
{
    check(obj, Allow,null)
}
function check(obj, Allow,evt)
{

	    if(Allow == 1 && AllowOnly('a..z',evt))
	    {
	        return false;
	    }
	    if(Allow == 2 && AllowOnly('0..9',evt))
	    {
	        return false;
	    }
	    if(Allow == 3 && AllowOnly('a..z|0..9| -.',evt))
	    {
	        return false;
	    }
	    if(Allow == 4 && AllowOnly('0..9| -.',evt))
	    {
	        return false;
	    }
	    if(Allow == 5 && AllowOnly('a..z|0..9 ',evt))
	    {
	        return false;
	    }
	     if(Allow == 6 && AllowOnly('0..9',evt))
	    {
	        return false;
	    }	
	    if(Allow == 7 && AllowOnly('a..z|0..9',evt))
	    {
	        return false;
	    }
	    if(Allow == 8 && AllowOnly('0..9|.',evt))
	    {
	        return false;
	    }
	    if(Allow == 9 && AllowOnly('a..z|0..9|.-/',evt))
	    {
	        return false;
	    }
	     if(Allow == 10 && AllowOnly('a..z|0..9| _.@',evt))
	    {
	        return false;
	    }
	    if(Allow == 11 && AllowOnly('0..9| -',evt))
	    {
	        return false;
	    }
	     if(Allow == 12 && AllowOnly('a..z|0..9|_.@',evt))
	    {
	        return false;
	    }
	        
	//}
}

/**************************************************************
 AllowOnly: This function allow entering just the specified
            Expression to a textbox or textarea control.

 Parameters:
      Expression = Allowed characters.
                   a..z => ONLY LETTERS
                   0..9 => ONLY NUMBERS
                   other symbols...

 Example: use the onKeyPress event to make this function work:
          //Allows only from A to Z
          onKeyPress="AllowOnly('a..z');"

          //Allows only from 0 to 9
          onKeyPress="AllowOnly('0..9');"

          //Allows only A,B,C,1,2 and 3
          onKeyPress="AllowOnly('abc123');"

          //Allows only A TO Z,@,#,$ and %
          onKeyPress="AllowOnly('a..z|@#$%');"

		  //Allows only A,B,C,0 TO 9,.,,,+ and -
          onKeyPress="AllowOnly('ABC|0..9|.,+-');"

 Remarks: Use the pipe "|" symbol to separate a..z from 0..9 and symbols

 Returns: None
***************************************************************/
function AllowOnly(Expression,evt)
{
	Expression = Expression.toLowerCase();
	Expression = Replace(Expression, 'a..z', 'abcdefghijklmnopqrstuvwxyz');
	Expression = Replace(Expression, '0..9', '0123456789');
	Expression = Replace(Expression, '|', '');

	var ch = "";
	if(document.all)
	    ch = String.fromCharCode(window.event.keyCode);	    
	else
	{
	    if(evt.which == 0 || evt.which == 8)
	        return false;
	        
	    ch = String.fromCharCode(evt.which);
	}
	ch = ch.toLowerCase();
	Expression = Expression.toLowerCase();
	var a = Expression.indexOf(ch);	
	if (a == -1) 
	{
	    if (document.all)
            window.event.returnValue = false;
        else
        {
            if (evt.cancelable ) 
                evt.preventDefault();
        }	
    }
}
