
function resize()
{
  var wide = window.screen.availWidth
  var high = window.screen.availHeight
  var maxh = 950
  var maxw = 820 
  var content = document.getElementById('envelop')
  content.style.position = 'absolute'
  if(maxh > 0 && high <= maxh)
  {
  content.style.height = high
  }
  if(maxw > 0 && wide <= maxw)
  {
  content.style.height = high
  }
  if(maxh > 0 && high > maxh)
  {
  content.style.height = maxh
  high = (high - maxh) / 2
  content.style.top = high
  }
  if(maxw > 0 && wide > maxw)
  {
  content.style.width = maxw
  wide = (wide - maxw) / 2
  content.style.left = wide
  }
 
}


function temps()
{
var t=new Date()
var h=t.getHours()

if (h>12&&h<=24)
{
h=h-12
}



var m=t.getMinutes()
if(m<10){m="0"+m}

var s=t.getSeconds()
if(s<10){s="0"+s+" "}
if(s>=10){s=s+" "}



document.getElementById('realtime').innerHTML=h+":"+m+":"+s+" "

setTimeout("temps()",1000)
}




function am()
{
var t=new Date()
var h=t.getHours()
if(h>=12)
{
document.getElementById('real').innerHTML="PM"+" "
}
else
{
document.getElementById('real').innerHTML="AM"+" "
}
setTimeout("am()",1000)
}




function jour()
{
var t=new Date()
var x=new Array("Sunday", "Monday",
   "Tuesday", "Wednesday", "Thursday",
   "Friday", "Saturday")

 var y=new Array("January", "February",
   "March", "April", "May",
   "June", "July" , "August", "September", "October",
   "November", "December")      

 var z=t.getYear();

var n=z.toString()
var  browser=navigator.appName
if(browser=="Netscape"||browser=="Firefox"||browser=="Safari"||browser=="Chrome")

{
z="20"+n.substring(1,n.length)
}

 var u=t.getDate();

document.getElementById('realdate').innerHTML="on"+" "+x[t.getDay()]+" "+y[t.getMonth()]+" "+u+","+" "+z

setTimeout("jour()",1000)
}








function dis()
{
var t=new Date()
var x=new Array("Sunday", "Monday",
   "Tuesday", "Wednesday", "Thursday",
   "Friday", "Saturday")

 var y=new Array("January", "February",
   "March", "April", "May",
   "June", "July" , "August", "September", "October",
   "November", "December")      

 var z=t.getYear();

 var u=t.getDate();

var h=t.getHours()
if(h<10){h="0"+h}



var m=t.getMinutes()
if(m<10){m="0"+m}

var s=t.getSeconds()
if(s<10 &&h<12){s="0"+s+" "+"AM"}
if(s>=10 &&h<12){s=s+" "+"AM"}
if(s<10 &&h>=12){s="0"+s+" "+"PM"}
if(s>=10 &&h>=12){s=s+" "+"PM"}


document.getElementById('realtime').innerHTML=h+":"+m+":"+s+" "+"on"+" "+x[t.getDay()]+" "+y[t.getMonth()]+" "+u+","+" "+z


setTimeout("dis()",1000)
}




function popitup(url)
{
	newwindow=window.open(url,'name','width=345,height=370');
	if (window.focus) {newwindow.focus()}
	return false;
}




function beta()
{
var answer=confirm('Click OK to go to Our New Home Page or CANCEL to Stay on This Page');
if(answer){window.location.replace('index_submenu.html')}
}


function submenu()
{
window.location.replace('/index_submenu.html')

}



function gobeta()
{
setTimeout("submenu()",3000)
}


function de()
{
document.can.prov.selectedIndex=0
document.can.loan.selectedIndex=0
}

function al()
{
document.can.prov.selectedIndex=1
document.can.loan.selectedIndex=1
}

function ak()
{
document.can.prov.selectedIndex=5

}

function ar()
{
document.can.prov.selectedIndex=48
document.can.loan.selectedIndex=2
}

function az()
{
document.can.prov.selectedIndex=10
}

function ca()
{
document.can.prov.selectedIndex=15
document.can.loan.selectedIndex=3
}

function co()
{
document.can.prov.selectedIndex=33
}

function ct()
{
document.can.prov.selectedIndex=39
document.can.loan.selectedIndex=4
}

function tx()
{
document.can.prov.selectedIndex=44
}

function or()
{
document.can.prov.selectedIndex=52
document.can.loan.selectedIndex=5
}

function roller()
{
setTimeout("al()",1000);

setTimeout("ak()",3000);

setTimeout("ar()",5000);

setTimeout("az()",7000);

setTimeout("ca()",9000);

setTimeout("co()",11000);

setTimeout("tx()",13000);

setTimeout("ct()",15000);

setTimeout("or()",17000);

setTimeout("de()",19000);

setTimeout("roller()",20000)
}
