


ShowNav = function( innerNavId, expandContractImage )
{
	var img = document.getElementById(expandContractImage);	
	
	
	if( img.src.indexOf( "bullet_cross.gif" ) > -1 )
	{
		img.src = img.src.replace( "bullet_cross.gif", "bullet_dash.gif" );
		document.getElementById(innerNavId).style.display = "block";
	}
	else
	{
		img.src = img.src.replace( "bullet_dash.gif", "bullet_cross.gif" );
		document.getElementById(innerNavId).style.display = "none";
	}
} 
// render date/time script added by MH
var weekdaystxt=new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
function showLocalTime(container,dateTime){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
var servertimestring=dateTime
this.localtime=this.serverdate=new Date(servertimestring)
this.updateTime()
this.updateContainer()
}
showLocalTime.prototype.updateTime=function(){
var thisobj=this
this.localtime.setSeconds(this.localtime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}
showLocalTime.prototype.updateContainer=function(){
var thisobj=this
var dayofweek=weekdaystxt[this.localtime.getDay()]
var d=this.localtime.getDate()
var m=m_names[this.localtime.getMonth()]
var y=this.localtime.getYear()
var hour=this.localtime.getHours()
var minutes=this.localtime.getMinutes()
var seconds=this.localtime.getSeconds()
var ampm=(hour>=12)? "pm" : "am"
this.container.innerHTML=formatField(hour, 1)+":"+formatField(minutes)+ampm
setTimeout(function(){thisobj.updateContainer()}, 1000) //update container every second
}

function formatField(num, isHour){
if (typeof isHour!="undefined"){ //if this is the hour field
var hour=(num>12)? num-12 : num
return (hour==0)? 12 : hour
}
return (num<=9)? "0"+num : num//if this is minute or sec field
}

/****************************************************************/
/* popup functions
/****************************************************************/
function popUp(sUrl) {
	window.open(sUrl, '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=340,height=390,left=50,top=50');
}

function popUpCSL(sUrl) {
	window.open(sUrl, '', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=yes,width=640,height=480,left=50,top=50');
}

function popUpRep(sUrl) {
	/*sUrl = '/tabid/384/Default.aspx?xsfid=' && sUrl*/
	window.open('/tabid/384/Default.aspx?xsfid='+sUrl, '', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=600,left=50,top=50');
}

