// JavaScript Document
function startTime()
{
var now=new Date()
var h=now.getHours()
var m=now.getMinutes()
if (h==0)
{var h=12}
h=nonMil(h)
m=checkTime(m)
document.getElementById('time').innerHTML="&nbsp;"+h+":"+m
t=setTimeout('startTime()',500)




}

function checkTime(i)
{
if (i<10) 
  {i="0" + i}
  return i
}

function nonMil(i)
{
if (i>12)
 {i=i-12}
 return i
}


function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function checkCookie(c_name)
{
c_name=getCookie(c_name);
if (c_name!=null && c_name!="")
  {
  return(1);
  }
  else 
  {
  return(0);
    }
  }

  
  
  function Expand(id){

   if (document.all){

     if(document.all[id].style.display == 'none'){

       document.all[id].style.display = '';

     } else {

       document.all[id].style.display = 'none';

     }

  return false;

   } else if (document.getElementById){

     if(document.getElementById(id).style.display == 'none'){

       document.getElementById(id).style.display = 'block';

     } else {

       document.getElementById(id).style.display = 'none';

     }

  return false;

   }

 }
 function tried(){
	var tried=1; 
 }


function tidy() {
if ($(document).height() > $('#wrap').height()) 
{
	$('#wrap').height( $(document).height() );
	
}

}
tidy();

//test
$(window).resize( tidy );


