months = new Array('January','February','March','April','May','June','July','August','September','October','November','December')
smonths = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')
days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday')
function writeDateFull() {now = new Date(); document.write(days[now.getDay()]+", "+now.getDate()+" "+months[now.getMonth()]+" "+now.getFullYear())}


function siteSearch(f){
isBlank(f.Keywords)
if(!f.Keywords.value) {alert("Please enter the keyword to search for."); f.Keywords.focus(); f.Keywords.value=""; return false}
return true
}

function listGoURL(g) {if(g.options[g.selectedIndex].value) location=g.options[g.selectedIndex].value}


function writeDateList(dd){
for(i=1; i<=31; i++){
	if(i==parseInt(dd,10)) {document.write("<option value="+insZero(i,2)+" selected>"+insZero(i,2))}
	else {document.write("<option value="+insZero(i,2)+">"+insZero(i,2))}
}}
function writeMonthList(l,mm){
mthList=l?months:smonths
for(i=1; i<=12; i++){
	if(i==parseInt(mm,10)) {document.write("<option value="+insZero(i,2)+" selected>"+mthList[i-1])}
	else {document.write("<option value="+insZero(i,2)+">"+mthList[i-1])}
}}
function insZero(num,sf){
var inputStr=num.toString()
while(inputStr.length<sf) {inputStr="0"+inputStr}
return inputStr
}

function isBlank(input){
var iStr=input.value
if(window.RegExp && iStr!=""){
	var regExp1 = /\S/
	if(!regExp1.test(iStr)) {input.value="";return true}; return false
}}

function isEmail(input){
var iStr=input.value
if(window.RegExp && iStr!=""){
	var regstr1 = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)"
	var regstr2 = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"
	var regExp1 = new RegExp(regstr1)
	var regExp2 = new RegExp(regstr2)
	var regExp3 = /[^a-zA-Z0-9\-_.@]/
	if(!(!regExp1.test(iStr) && regExp2.test(iStr) && !regExp3.test(iStr)) || !(iStr.indexOf("@")>=0)) {alert("Invalid entry.\n\nPlease enter a valid Email Address.");input.value="";input.focus();return false}; return true
}}

function capIt(g){
var iStr=g.value.toLowerCase(), oStr=""
for(i=0;i<iStr.length;i++) {tChar=iStr.charAt(i); oStr+=(i==0||iStr.charAt(i-1)==" ")?(tChar==" "?"":tChar.toUpperCase()):tChar}
g.value=(oStr.charAt(oStr.length-1)==" ")?oStr.slice(0,-1):oStr
}

var swfMapWin
function popMapWin(i){
swfMapWin=window.open(i,"swfMap","width=483,height=381"); swfMapWin.window.focus()
}

var imgWin
function popImgWin(i){
imgWin=window.open(i,"imgMedia","width=620,height=420"); imgWin.window.focus()
}

var mgtWin
function popMgtWin(i){
mgtWin=window.open(i,"imgManagement","width=516,height=400,scrollbars"); mgtWin.window.focus()
}