function GetDay(intDay){
    var DayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday", 
                         "Thursday", "Friday", "Saturday")
    return DayArray[intDay]
    }

  function GetMonth(intMonth){
    var MonthArray = new Array("January", "February", "March",
                               "April", "May", "June",
                               "July", "August", "September",
                               "October", "November", "December") 
    return MonthArray[intMonth] 	  	 
    }
  function getDateStrWithDOW(){
    var today = new Date()
    var year = today.getYear()
    if(year<1000) year+=1900
    var todayStr = GetDay(today.getDay()) + ", "
    todayStr += GetMonth(today.getMonth()) + " " + today.getDate()
    todayStr += ", " + year
    return todayStr
 }
 
  var curDateTime = new Date()
  var curHour = curDateTime.getHours() 
     + curDateTime.getTimezoneOffset()/60
  if (curHour > 24)  curHour -= 24
  if (curHour < 0) curHour += 24
  var curMin = curDateTime.getMinutes()
  var curSec = curDateTime.getSeconds()
  var curTime = 
    ((curHour < 10) ? "0" : "") + curHour + ":" 
    + ((curMin < 10) ? "0" : "") + curMin + ":" 
    + ((curSec < 10) ? "0" : "") + curSec


var homepage=false;

function imgswap(t,p,c,i,s) {
	bw.ns4?document.layers[c].document.layers[p].document.layers[t].document.images[i].src=s:document.images[i].src=s;
}

function imageroll(i,s) {
		document.images[i].src=s;
}

//	img - image, src - new source, div - first div (optional), pdiv - parent div (optional)
function doRoll(img,src,div,pdiv) {
	if (bw.ie) {
		document.images[img].src=src;
	} else {
		div=(!div)?'':'document.'+div+'.';
		pdiv=(!pdiv)?'':'document.'+pdiv+'.';
		dom=eval(pdiv+div+'document.images.'+img);
		dom.src=src;
	}
}

//	img - image, ind - preload index, div - first div (optional), pdiv - parent div (optional)
function preRoll(img,ind,div,pdiv) {
	if (bw.ie) {
		document.images[img].src=preload[ind].src;
	} else {
		div=(!div)?'':'document.'+div+'.';
		pdiv=(!pdiv)?'':'document.'+pdiv+'.';
		dom=eval(pdiv+div+'document.images.'+img);
		dom.src=preload[ind].src;
	}
}

preload=new Array()
function addPreload() {
	for (i=0;i<arguments.length;i++) {
		newindex=preload.length;
		preload[newindex]=new Image();
		preload[newindex].src=arguments[i];
	}
}

function updateHead(s) {
	if (bw.ie) {dHeader=parent.navframe.document.images["pageheader"]}
	if (bw.ns4) {dHeader=parent.navframe.document.header.document.images["pageheader"]}
	dHeader.src=s
}

function checkBrowser(){
	this.win=(navigator.platform=="Win32")?1:0;
	this.mac=(navigator.platform=="MacPPC")?1:0;
	this.ns4 = (document.layers) ? true : false;
	this.ie4 = (document.all && !document.getElementById) ? true : false;
	this.ie5 = (document.all && document.getElementById) ? true : false;
	this.ns6 = (!document.all && document.getElementById) ? true : false;			
	this.ns7 = (!document.all && document.getElementById) ? true : false;			
	return this
}

function objLayer(id) {
	/* object pointer */ 
	this.obj=document.getElementById(id);
	
	/* style reference */
	this.css=document.getElementById(id).style;
	
	/* mac variant */
	if (bw.mac && (bw.ie4 || bw.ie5)) {this.h=this.obj.clientHeight; this.w=this.obj.clientWidth}
	
	if (bw.ie5) {this.x=this.css.pixelLeft; this.y=this.css.pixelTop; this.h=this.obj.scrollHeight; this.w=this.obj.scrollWidth}
	if (bw.ns6) {this.x=this.css.left; this.y=this.css.top; this.w=this.css.width; this.h=this.css.height;}
	
	
	return this;
}

function obj_moveTo(x,y){
	this.x=x
	this.y=y
	this.css.left=this.x+"px";
	this.css.top=this.y+"px";
}

function obj_moveBy(x,y){
	this.x+=x
	this.y+=y
	this.css.left=this.x+"px";
	this.css.top=this.y+"px";
}

function obj_setZIndex(z){
	this.css.zIndex = z
}

function obj_clipTo(t,r,b,l){
	if(bw.ns4){
		this.css.clip.top = t
		this.css.clip.right = r
		this.css.clip.bottom = b
		this.css.clip.left = l
	} else {
		this.css.clip="rect("+t+","+r+","+b+","+l+")"
	}
}

function obj_hide(){
	this.css.visibility=(bw.ns4)?'hide':'hidden'
}

function obj_show(){
	this.css.visibility=(bw.ns4)?'show':'visible'
}

function obj_writeIt(txt){
	if (bw.ns4){
		this.obj.document.write(txt)
		this.obj.document.close()
	} else {
		this.obj.innerHTML = txt
	}
}

function obj_changeBackColor(c) {
	if (bw.ns4){
		this.css.bgColor = c;
	} else {
		this.css.backgroundColor = c;
	}
}

function obj_changeAlpha(o) {//IE only filter
	if (bw.ns4) {
		//do nothing
	} else {
		this.css.filter = "alpha(opacity="+o+")"
	}
}

function obj_setSize(w,h) {
	this.css.width=w;
	this.css.height=h;
	this.w=w;
	this.h=h;
}

objLayer.prototype.moveTo=obj_moveTo
objLayer.prototype.moveBy=obj_moveBy
objLayer.prototype.clipTo=obj_clipTo
objLayer.prototype.hide=obj_hide
objLayer.prototype.show=obj_show
objLayer.prototype.writeIt=obj_writeIt
objLayer.prototype.setZIndex = obj_setZIndex
objLayer.prototype.changeBack=obj_changeBackColor
objLayer.prototype.changeAlpha=obj_changeAlpha
objLayer.prototype.setSize=obj_setSize
