function doNothing() {
// This function does nothing!
}

function showStatus(msg) {
	window.status = msg
	return true
}

//--------------------------------
// Set global date variables for copyright notice.
//--------------------------------

var today = new Date()
var year = today.getYear()
if(year < 1000){
	year += 1900
}

var monthArray = new Array("January", "February", "March", 
                   "April", "May", "June", "July", "August",
                   "September", "October", "November", "December")

function showTodaysDate() {
	document.write (monthArray[today.getMonth()] + " " +  today.getDate() + ", " + year)
}

// Set global variables for email address masking.
 
var emailProtocol = "mail" + "to:"
var Domain = "@renfrovalley.com"

function eMail (masked,visible) {
    this.masked = masked
    this.visible = visible
}

// Associate each masked email address with its visible link text.
// Edit only the items in quotes. 

var emailAddrs = new Array ()
    emailAddrs[0] = new eMail(emailProtocol + "webmaster" + Domain,"Site Feedback")
    emailAddrs[1] = new eMail(emailProtocol + "info" + Domain,"General Information")
    emailAddrs[2] = new eMail(emailProtocol + "sales" + Domain,"Sales")
    emailAddrs[3] = new eMail(emailProtocol + "support" + Domain,"Customer Support")

function writeMaskedAddr (addrID,subject,style) {
// Write an email link onto the page. 
// Arguments: addrID  = array index of one of the address in the emailAddrs array defined above. 
//                     This identifies which address you want to send the email to.
//                     Example: writeMaskedAddr(0) sends email to the "webmaster" address.
//            subject = Optional quoted string variable for email Subject line. If omitted, no Subject
//                     is supplied for the email message. Users, of course, may add a subject manually.
//                     Example: writeMaskedAddr(2,'Sales inquiry from the web site')
//            style   = Optional CSS style for the link

	document.write("<a href=\"javascript:doNothing()\;\"");
	if (style != '') {
		document.write(" class='" + style + "' ");
	}
	document.write(" onMouseOver=\"return showStatus('Send email.')\" onMouseOut=\"return showStatus('')\"");
	document.write(" onClick=\"parent.location='");
	document.write(emailAddrs[addrID].masked);
	if (subject == '') {
		document.write("'\">");
	} else {
		document.write("?subject=" + subject + "'\">");
	}
	document.write(emailAddrs[addrID].visible);
	document.write("</a>");
}

//--------------------------------
// Entertainment Image Detail window creator.
// syntax: entertainmentImageDetail()
//--------------------------------

var newImageWindow

function entertainmentImageDetail(imageName) {

if (!newImageWindow || newImageWindow.closed) {
    // create the imageDetail window
    newImageWindow = window.open("","Image","width=500,height=600")

    // Create .opener property if necessary for old browsers.
    if (!newImageWindow.opener) {
        newImageWindow.opener = window
    }
    
    // Assemble content for window.
    var newContent = "<HTML><HEAD><TITLE>Image Detail</TITLE></HEAD>"
    newContent += "<BODY BGCOLOR='#550002'><CENTER><P><img border='0' src='/entertainment/images/"
    newContent += imageName
    newContent += "'></P>"
//    newContent += "<p><font face='Arial, Helvetica, sans-serif' color='#FFFFFF' size='1'><b>"   
//    newContent += imageName
    newContent += "</b></font></p>"
    newContent += "<FORM><INPUT TYPE='button' onClick='javascript:window.print()' VALUE='Print'><INPUT TYPE='button' onClick='javascript:window.close()' VALUE='Close'></FORM>"
    newContent += "<p><font face='Arial, Helvetica, sans-serif' color='#CCCCCC' size='2'><b>Copyright 2004 Renfro Valley</b></font></p>"
    newContent += "</CENTER></BODY></HTML>"
    
    // Write HTML into new window document.
    newImageWindow.document.write(newContent)
    newImageWindow.document.close()
    
} else {
    // window's already open; bring to front
    newImageWindow.focus()
    }
}