<!--
// New library object for dynamic layers 
//Global document object
d = window.document
loaded = false;

function setFocus()
{	//	Set cursor to txtUserName text field
	for (i=0; i<window.document.forms[0].elements.length; i++) {
		if (window.document.forms[0].elements(i).name.search("txtUserName") != -1)
			window.document.forms[0].elements(i).focus();
	}
}


var bChanged = false;
var temp;
var bValidated = false;
function valueChanged(pContentID) {
	bChanged = true;
	//document.frmPage.bChanged.value = "yes";	(from SchedulePrefs.aspx)
	//document.frmPage.confirmed.value = "yes"; (from PromoPrefs.aspx)
	temp = eval("document.frmPage.changedID" + pContentID + ".value='Yes'");
}

function Popup(wintype) {	//function used to popup video window (for sample videos, promos, etc)
	SmallWin=window.open(wintype,"SmallWin","toolbar=no,directories=no,status=no,scrollbars=no,menubar=no,width=420,height=420,resizable=no"); 
	SmallWin.window.focus(); 
}

//
//BEGIN: Attendance related
//

function getAttendance(str_c_name) {
	document.frmPage.c_name.value=str_c_name;
}

function checkAttendance(iOldAttendance, iMinAttendance, iMaxAttendance) {
	var strMessage;
	var idefaultAttendance
	var iAttendance=document.frmPage.txtAttendance.value;
	if (iOldAttendance < 100)
		iDefaultAttendance=15208;
	else
		iDefaultAttendance=iOldAttendance;
	
	
	if (isNaN(document.frmPage.txtAttendance.value)) { 
		alert("Please enter a valid attendance number!");
		document.frmPage.txtAttendance.value=iOldAttendance;
		document.frmPage.txtAttendance.focus();
	}
	else { 
		if (iOldAttendance > 1)	{	//Then use 20% range
			if (iAttendance < iMinAttendance || iAttendance > iMaxAttendance) {
				strMessage=" You have entered an attendance figure that varies by more than 20% of your historical data.  Are you sure that this is correct?";
				strMessage=strMessage + "\n Please click 'OK' to confirm your entry of " + iAttendance + " and proceed, or click 'Cancel' to return and enter a new attendance figure.";
				strMessage=strMessage + "\n Thanks for your cooperation.";			
			
				if (!confirm(strMessage)) { 
					document.frmPage.txtAttendance.value="";
					document.frmPage.txtAttendance.focus();	
			        return false;
				}
				else checkFinish()
			}
		}
		else { 				//Else use default of 15208
		
			if (iAttendance < iDefaultAttendance) { 
				strMessage=" The attendance figure you entered, " + iAttendance + ", seems somewhat low and below industry averages.";
				strMessage=strMessage + "\n Please click 'OK' to confirm your entry of " + iAttendance + " and proceed, or click 'Cancel' to return and enter a new attendance figure.";
				strMessage=strMessage + "\n Thanks for your cooperation.";
				
				if (!confirm(strMessage)) {
					document.frmPage.txtAttendance.value="";
					document.frmPage.txtAttendance.focus();	
			        return false;
				}
				else checkFinish()
			}
		}
		checkFinish()
	}	
}

function checkFinish() {
	var strMessage
	if ((document.frmPage.txtAttendance.value == document.frmPage.txtOldAttendance.value) && (document.frmPage.acceptDefault.checked == false))
	{
		strMessage="Your club attendance data is extremely important and necessary for properly computing your advertising commissions.  Please realize that not providing your data may affect your club commissions.  Won't you please provide your attendance data to us now?";
		strMessage=strMessage + "\nPlease click on 'Accept Default' to accept the default value shown or enter a valid attendance number.";
		if (confirm(strMessage)) { return false; }
		else {
			if (confirm("By Canceling and not providing your Monthly Attendance Data, youare putting your advertising commissions at risk of being withheld.  Click 'OK' to return to the Monthly Club Attendance Data page or 'Cancel' to exit without providing your data."))
			{ return false; }
			return false;
		}
	}
	else { doSubmitAttendance() }
}

function doSubmitAttendance() {

	if (document.frmPage.ddlClubs.value == -100) {
		alert("Please select a club from the list.");
		return false;
	}

//	if ( isNaN(document.frmPage.txtAttendance.value) || (document.frmPage.txtAttendance.value == "") || (document.frmPage.txtAttendance.value < 1000) || (document.frmPage.txtAttendance.value > 100000) ) {
//		alert("Please enter a valid number between 1000 and 100,000!");
//		document.frmPage.txtAttendance.value = "";
//		document.frmPage.txtAttendance.focus();
//		return false;
//	}
	if (confirm("Are you sure you want to update this informtation?")){
        document.frmPage.hiddenSubmit.value = "Submit";
		document.frmPage.submit()	}
}

function doAccept() {
	document.frmPage.accepted.value="yes";
	document.frmPage.submit();
}

function remindAboutAttendance()
{
//	alert("You have not submitted this month's member attendance for this Club. If you wish to do so now, please select the current month, and enter member attendance for the month.");
//	document.frmPage.txtAttendance.focus();
}
//END: Attendance Related.


//
//BEGIN: from Generate.aspx
//
var MyWindow = null;

//this function refreshes the page if a new club has been selected
function getValues(){
	document.frmPage.submit();
}

//this function refreshes the page if a new club has been selected and closes the MyWindow popup
function getValues_ClosePopup(){
	if (MyWindow)
		MyWindow.close();
	document.frmPage.submit();
}

// Open window
function openFile(strFileName) { //alert(strFileName);
	var wid;
	var hgt;
	var sBars = "yes";
	var sOptions = "";
	var sSwitch;
	if (strFileName.substring(0,22) == "ClubAmenityBrands.aspx")	//to remove querystring
		{ sSwitch = "ClubAmenityBrands.aspx"; }
	else {
//		if (strFileName.substring(0,15) == "MemberStats.asp")	//to remove querystring
//			{ sSwitch = "MemberStats.asp"; }
//		else { 
		    sSwitch = strFileName; 
//		}
	}
	if (MyWindow == null || MyWindow.closed || MyWindow == "0") {

	} 
	else {	
		MyWindow.close();
	}
	this.window.name = "oldWindow";
	switch (sSwitch) 
	{ 
		case "ClubAmenityBrands.aspx" : 
			wid=400; hgt=250; sBars="no"; 
			sOptions=",status=no,toolbar=no,menubar=no,resizable=no,directories=yes,dependent=yes"; 
			break; 
		case "MemberAttendance.aspx" : 
			wid=825; hgt=700; 
			sOptions=",status=no,toolbar=no,menubar=no,resizable=yes,directories=no,titlebar=no,dependent=yes"; 
			break; 
		case "MemberAttendanceConfirmReject.aspx" : 
			wid=400; hgt=300; 
			sOptions=",status=no,toolbar=no,menubar=no,resizable=yes,directories=no,titlebar=no,dependent=no"; 
			break; 
		case "MemberAttendanceTerms.aspx" : 
			wid=700; hgt=550; 
			sOptions=",status=no,toolbar=no,menubar=no,resizable=yes,titlebar=no,directories=no"; 
			break; 
		case "MemberStatsSummary.asp" : 
			wid=975; hgt=550; 
			sOptions=",status=no,toolbar=no,menubar=no,resizable=yes,titlebar=no,directories=no"; 
			break; 
		case "MemberStats.asp" : 
			wid=650; hgt=500; 
			sOptions=",status=no,toolbar=no,menubar=no,resizable=yes,titlebar=no,directories=no"; 
			break; 
		case "ScrollingText.aspx" : 
			wid=800; hgt=550; 
			sOptions=",status=yes,toolbar=yes,menubar=yes,resizable=yes,directories=yes,dependent=yes"; 
			break; 
		case "UserChannelRpt.aspx" : 
			wid=1024; hgt=600; sBars="no"; 
			sOptions=",status=yes,toolbar=yes,menubar=yes,resizable=yes,directories=yes,dependent=yes";
			break; 
		default : 
			wid=800; hgt=500; sOptions=",status=no,toolbar=no,menubar=no,resizable=no,directories=yes,dependent=yes";
	} 
	MyWindow = window.open("","MyWindow","width=" + wid + ",height=" + hgt + ",scrollbars=" + sBars + sOptions + ",location=no,screenX=1,screenY=1");
	MyWindow.location.href = strFileName;
	MyWindow.focus();
}
//END: from Generate.aspx

//BEGIN: from ZoneName.aspx
function validateZoneName(sForm) {
	if (document.getElementById(sForm).txtZoneName.value == ""){		
		alert("Please enter a valid zone name!");
		document.getElementById(sForm).txtZoneName.focus();
	}
	else {
		document.getElementById(sForm).doSubmit.value = "SubmitZoneNameChange";
		document.getElementById(sForm).submit();
	}
}

function toggleFeature(sFeature) {
    if (document.getElementById(sFeature).style.display=="none")
		{document.getElementById(sFeature).style.display="block"}
	else {document.getElementById(sFeature).style.display="none"}

}

function CloseWindow() {
	//Close the current browser window.
	self.window.close();
}
//END: from ZoneName.aspx


//
//BEGIN: Digital Signage Related
//

function formatDateYMD(ctlDate, pdateFormat) {
    //  Determine date format and reformat to YYYYMMDD to allow for comparisons
    
    //Get date format from current culture.
    var dateFormat
    var formatChar
    var aFormat
    var tokensChanged
    var daySelected
    var monthSelected
    var yearSelected

    //Determine date format separator character 
    dateFormat = pdateFormat
    formatChar = ' '
    aFormat = dateFormat.split(formatChar)
    if (aFormat.length < 3) 
    {
        formatChar = '/'
        aFormat = dateFormat.split(formatChar)
        if (aFormat.length < 3) 
        {
            formatChar = '.'
            aFormat = dateFormat.split(formatChar)
            if (aFormat.length < 3) 
            {
                formatChar = '-'
                aFormat = dateFormat.split(formatChar)
                if (aFormat.length < 3)
                {
                    // invalid date	format
                    formatChar = ''
                }
	        }
        }
    }

    tokensChanged = 0

    if ( formatChar	!= '' )
    {
        // Split date into its component parts
        aData = ctlDate.split(formatChar)

        for	(i=0;i<3;i++)
        {
            if ((aFormat[i]=='d') || (aFormat[i]=='dd'))
            {
                daySelected = parseInt(aData[i], 10)
                tokensChanged++
            }
            else if	((aFormat[i]=='m') || (aFormat[i]=='mm'))
            {
                // Remember, months run from zero to 11 in javasript
                monthSelected =	parseInt(aData[i], 10)
                tokensChanged++
            }
            else if	(aFormat[i]=='yyyy')
            {
                yearSelected = parseInt(aData[i], 10)
                tokensChanged++
            }
            else if	(aFormat[i]=='mmm')
            {
            // Remember, months run from zero to 11 in javasript
             for	(j=0; j<12;	j++)
                {
                    if (aData[i]==monthName[j])
                    {
                        monthSelected = j + 1   //add 1 to get correct month number
                        tokensChanged++
                    }
                }
            }
        }
    }

    if ((tokensChanged!=3)||isNaN(daySelected)||isNaN(monthSelected)||isNaN(yearSelected))
    {
        daySelected = today.getDate()
        monthSelected = today.getMonth() + 1
        yearSelected = today.getYear()
    }

    //zero pad day and month as needed
    if (daySelected < 10) {daySelected = '0' + daySelected}
    if (monthSelected < 10) {monthSelected = '0' + monthSelected}

    //alert('here - ' + ' - ' + dateFormat + ' - ' + formatChar + ' - ' + yearSelected + monthSelected + daySelected + today.getMonth())
    return yearSelected + '' + monthSelected + '' + daySelected 
}

//END: Digital Signage Related


//Opens reports
function openReport(strFileName){

    var MyWindow = null;
	var sNetworks
	sNetworks = ''
	var bNetworkSelected
	bNetworkSelected = false
	
    if (document.getElementById('NetworksChainsClubs1_ddlNetwork')) { 
        if (document.getElementById('NetworksChainsClubs1_ddlNetwork').value > 0) { 
            bNetworkSelected = true 
            sNetworks = document.getElementById('NetworksChainsClubs1_ddlNetwork').value
        }
    }
    else { 
        if (document.getElementById('NetworksChainsClubs1_txtOld_network_id').value > 0) {
            bNetworkSelected = true 
            sNetworks = document.getElementById('NetworksChainsClubs1_txtOld_network_id').value
        }
    }
    if (document.getElementById('lstNetwork_ids')) {
        if (document.getElementById('lstNetwork_ids').selectedIndex > 0) { bNetworkSelected = true }
    }

    if (bNetworkSelected == false) 
        alert("Please select a network before running the report.");
    else {
	    MyWindow = window.open("","mywindow","width=900,height=600,scrollbars=yes,resizable=yes,status=yes");
        if (document.getElementById('lstNetwork_ids')) {    //Check if reporting on multiple networks
	        if (document.getElementById('lstNetwork_ids').selectedIndex > 0) {	
	            sNetworks = ''
			    //Loop through network_ids 
			    for (j = 0; j < document.forms[0].lstNetwork_ids.length; j++) { 
				    if ((document.forms[0].lstNetwork_ids.item(j).selected == true)) {   //If the content is selected 
					    sNetworks = sNetworks + document.forms[0].lstNetwork_ids.item(j).value + ','
				    }
			    }
		        sNetworks = sNetworks.substring(0,sNetworks.length-1)
		    }
        }
        if (strFileName == "DeliveryComplianceForecastRpt.aspx") {
		    MyWindow.location.href = "../Advertising/" + strFileName +"?nets=" + sNetworks;
        }
        else {
		    MyWindow.location.href = "../Schedule/" + strFileName +"?nets=" + sNetworks;
        }
        MyWindow.focus();
	}
}


// Browser detection object
function lib_bwCheck(){
	this.ver = navigator.appVersion
	this.agent = navigator.userAgent
	this.dom = document.getElementById?1:0
	this.opera5 = this.agent.indexOf("Opera 5")>-1
	this.ie5 = (this.agent.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0
	this.ie6 = (this.agent.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0
	this.ie4 = (document.all && !this.dom && !this.opera5)?1:0
	this.ie = this.ie4||this.ie5||this.ie6
	this.mac = this.agent.indexOf("Mac")>-1
	this.ns6 = (this.dom && parseInt(this.ver)>=5)?1:0
	this.ns4 = (document.layers && !this.dom)?1:0
	this.bw = (this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
	return this
}
bw = new lib_bwCheck() // Browser detection object

function lib_obj(obj){
	this.el = bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval('document.' + obj):0;
	//alert(lib_obj);
	this.css = bw.ns4?document.layers[obj]:bw.ie4?document.all[obj].style:bw.dom?document.getElementById(obj).style:0
	this.moveIt = lib_moveIt;
	this.showIt = lib_showIt;
	this.hideIt = lib_hideIt;
	return this;
}

function lib_moveIt(x,y){
	if (x){this.x=x; this.css.left = x;}
	if (y){this.y=y; this.css.top = y;}
}

function lib_showIt(){this.css.visibility = "visible"}
function lib_hideIt(){this.css.visibility = "hidden"}

// DHTML fix detection for Netscape browser resize
if (d.layers) {
	origWidth=innerWidth;
	origHeight=innerHeight;
	onresize=DHTMLfix;
}
		
// DHTML fix for Netscape browser resize
function DHTMLfix() {
	if (origWidth != innerWidth || origHeight != innerHeight) {
		location.reload();
	}
}

function fixNav(){
	if(d.all)history.go(0)
	if (d.layers) {
		DHTMLfix();
	}
}

// Call this function when page is loaded
function init(){
	//place_menus();
	place_logo();
	loaded = true;
}

// Reposition TopBar background image, Logo, and Login Div
function place_logo(){
    lib_obj('LogoDiv').css.visibility = "hidden"
    lib_obj('LoginDiv').css.visibility = "hidden"
    //Build array of object and loop through
    oDiv = new Array();
    oDiv[0] = new lib_obj('topBar');
    //alert("place_logo - oDiv.length: " + oDiv.length);
    for(n=0; n<oDiv.length; n++){
        oDiv[n].moveIt(get_xPos("Logo",0),false);
        oDiv[n].showIt();
    }
    lib_obj('LogoDiv').css.visibility = "visible"
    lib_obj('LoginDiv').css.visibility = "visible"
}

// UNUSED menu placement
function place_menus(){
    mDiv = new Array();
    for (var i in menu_ar){
		mDiv[menu_ar[i]] = new lib_obj('m' + menu_ar[i]);
		mDiv[menu_ar[i]].moveIt(get_xPos(menu_ar[i]),false);
    }
	mDiv[rightmost_menu].moveIt(get_xPos(rightmost_menu,0),false);
    loaded=true;
    
	miniLoad();
}

// X Position Layer relative to anchor image
function get_xPos(object,offset){
	if(d.layers && !d.dom){
		xPos = d.images[object].x
	} else {
		xPos = d.images[object].offsetLeft;
		tempEl = d.images[object].offsetParent;
		while (tempEl != null) {
			xPos += tempEl.offsetLeft;
		    tempEl = tempEl.offsetParent;
		}
	}
	if (offset) xPos = xPos + offset;
	return xPos;
}


// Y Position Layer relative to anchor image 
function get_yPos(object,offset){
	if(d.layers && !d.dom){
		yPos = d.images[object].y
	} else {
		yPos = d.images[object].offsetTop;
		tempEl = d.images[object].offsetParent;
		while (tempEl != null) {
			yPos += tempEl.offsetTop;
		    tempEl = tempEl.offsetParent;
		}
	}
	if (offset) yPos = yPos + offset;
	return yPos
}

//     
// UNUSED for drop down menus
//     

// put the name of the images that trigger the dropdowns in this array
menu_ar = new Array();
//menu_ar[0] = 'products';
//menu_ar[1] = 'support';
//menu_ar[2] = 'company';
menu_ar[0] = 'CCLogo';
//menu_ar[1] = "Networks";
//menu_ar[2] = 'Advertising';
//menu_ar[3] = 'Production';
//menu_ar[4] = 'Support';

// menu variables
rightmost_menu = menu_ar[0];
delay=300;
active = menu_ar[0];
timer = null;
defaultMenuHighlight = '' // set this in the body of the page if one of the menu items should always be highlighted

//
// UNUSED rollover functions
function load_menu_rollovers(){
	mro_ar = new Array();
	for (var i=0;i<menu_ar.length;i++){
		mro_ar[menu_ar[i]] = new Array();
		mro_ar[menu_ar[i]]['off']=new Image();
		mro_ar[menu_ar[i]]['on']=new Image();
		mro_ar[menu_ar[i]]['off'].src="/webimages/nav-"+menu_ar[i]+".jpg";
		mro_ar[menu_ar[i]]['on'].src="/webimages/nav-"+menu_ar[i]+"-on.jpg";
	}
}

load_menu_rollovers();

function m_rollover(which){
	if (which != defaultMenuHighlight) {
		document.images[which].src = mro_ar[which]['on'].src;
	}
}

function m_rollout(which){
	if (which != defaultMenuHighlight) {
		document.images[which].src = mro_ar[which]['off'].src;
	}
}

//
// UNUSED menu functions 
function changeActive(which){
	if (loaded){
		clearTimeout(timer);
		mDiv[active].hideIt();
		m_rollout(active);
		active=which;
		mDiv[active].showIt();
		m_rollover(active);
	}
}

function killIt(){
	if (loaded){
		mDiv[active].hideIt();
		m_rollout(active);
	}
}

function killMenu(){
	if (loaded){
		timer = setTimeout("killIt()",delay);
	}
}

function sleep(){
	clearTimeout(timer);
}

function new_window(url,winWidth,winHeight) {
			var toolBarParms = "toolbar=0,directories=0,status=0,menubar=0,scrollbars=0";
			toolBarParms = toolBarParms + "resizable=0,width=" + winWidth + ",height=" + winHeight;
			newWin = window.open(url,"Print",toolBarParms);
			newWin.focus();
			newWin.print();
}

//
// Images Stuff
function MM_reloadPage(init) {  // reloads the window if Nav4 resized
    if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
// Called from Header.inc
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
// Called from onLoad event of <body> tag
    var d=document; 
    if(d.images){	// Check if there are any images in the document.
	    if(!d.MM_p) d.MM_p=new Array();	// If the MM_p array does not exist then create it.
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
        for(i=0; i<a.length; i++)	// Loop through the images passed to this function.
		    if (a[i].indexOf("#")!=0){	// Check that current array element(the arg passed) does not begin with a #.
			    // Load images in every other array element starting in element 1. Why?
			    d.MM_p[j]=new Image; 
			    d.MM_p[j++].src=a[i];
			    //alert("adding new image to MM_p array: 1" + a[i].indexOf("#") + "2 " + a[i] + " 3" + d.MM_p[j-1].src + " 4" + j + " 5" );
		    }
	    }
}

function MM_findObj(n, d) { // v4.01
// Called from MM_swapImage() function below
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { // v3.0
    // Called from onMouseOver event for menu items in Header.inc
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; 
    for(i=0;i<(a.length-2);i+=3)
	    if ((x=MM_findObj(a[i]))!=null){
		    document.MM_sr[j++]=x; 
		    if(!x.oSrc) x.oSrc=x.src; 
		    x.src=a[i+2];
	    }
}
//
// End Images Stuff

//     
// Misc functions
//     

// pop a window
POP_DEFAULT_WIDTH = 620;
POP_DEFAULT_HEIGHT = 450;

function popWin(url,width,height,otherOptions){
    var w = (width) ? width : POP_DEFAULT_WIDTH;
    var h = (height) ? height : POP_DEFAULT_HEIGHT;
    var options = 'width=' + w + ',height=' + h + ',scrollbars=yes';
    if (otherOptions) options += + "," + otherOptions;
    
    popper = window.open(url,'pw',options);
}

// print a page
function printPage(){
    if (window.print){
        window.print();
    }
    else {
        alert("To print this page, please select File >> Print.");
    }
}

//
// Function to display tooltip information in browser status bar under all platforms and browsers.  
function showStatusAll(theMessage)
{
	window.status = theMessage;
}

//
// Function to set arrow graphic on navigation menu
function setArrow (arrowIndex, state) 
{
    //if ((arrowIndex ==0) && (state =="on")) document.nav_00.src= "/webimages/arrow.gif";
    //else document.nav_00.src= "/webimages/spacer.gif";

    if ((arrowIndex ==1) && (state =="on")) document.nav_01.src= "/webimages/arrow.gif";
    else document.nav_01.src= "/webimages/spacer.gif";

    if ((arrowIndex ==2) && (state =="on")) document.nav_02.src= "/webimages/arrow.gif";
    else document.nav_02.src= "/webimages/spacer.gif";

    //if ((arrowIndex ==3) && (state =="on")) {document.nav_03.src= "/webimages/arrow.gif";}
    //else document.nav_03.src= "/webimages/spacer.gif";

    if ((arrowIndex ==4) && (state =="on")) {document.nav_04.src= "/webimages/arrow.gif";}
    else document.nav_04.src= "/webimages/spacer.gif";

    if ((arrowIndex ==5) && (state =="on")) {document.nav_05.src= "/webimages/arrow.gif";}
    else document.nav_05.src= "/webimages/spacer.gif";

    //if ((arrowIndex ==6) && (state =="on")) {document.nav_06.src= "/webimages/arrow.gif";}
    //else document.nav_06.src= "/webimages/spacer.gif";

    //if ((arrowIndex ==7) && (state =="on")) {document.nav_07.src= "/webimages/arrow.gif";}
    //else document.nav_07.src= "/webimages/spacer.gif";

    //if ((arrowIndex ==8) && (state =="on")) {document.nav_08.src= "/webimages/arrow.gif";}
    //else document.nav_08.src= "/webimages/spacer.gif";

    //if ((arrowIndex ==9) && (state =="on")) {document.nav_09.src= "/webimages/arrow.gif";}
    //else document.nav_09.src= "/webimages/spacer.gif";

    //if ((arrowIndex ==10) && (state =="on")) {document.nav_10.src= "/webimages/arrow.gif";}
    //else document.nav_10.src= "/webimages/spacer.gif";

    //if ((arrowIndex ==11) && (state =="on")) {document.nav_11.src= "/webimages/arrow.gif";}
    //else document.nav_11.src= "/webimages/spacer.gif";

    //if ((arrowIndex ==12) && (state =="on")) {document.nav_12.src= "/webimages/arrow.gif";}
    //else document.nav_12.src= "/webimages/spacer.gif";

    if ((arrowIndex ==13) && (state =="on")) {document.nav_13.src= "/webimages/arrow.gif";}
    else document.nav_13.src= "/webimages/spacer.gif";

    parent.theArrowIndex = arrowIndex;
    //alert("parent.theArrowIndex: " + parent.theArrowIndex);
}

//
function openMenuURL(url,target,index,state)
{
	setArrow(index,state);
	eval("parent." + target + ".location.href = url;");
}

// Set default button for TextBox in ASP.NET 
function setDefaultBtn(e, buttonid){ 
      var btn = document.getElementById(buttonid); 
      if (typeof btn == 'object'){ 
            if(navigator.appName.indexOf("Netscape")>(-1)){ 
                  if (e.keyCode == 13){ 
                        btn.click(); 
                        return false; 
                  } 
            } 
            if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
                  if (event.keyCode == 13){ 
                        btn.click(); 
                        return false; 
                  } 
            } 
      } 
} 

// Disable button
function disableButton(p_Button) {
    eval("document.frmPage." + p_Button + ".disabled = true;");
}

//-->