// ************************************************************************
// 
//   COPYRIGHT (C) 2002-2004 by David Nason
// 
//   ALL RIGHTS RESERVED
// 
//   MODULE:       utils.js
// 
//   DESCRIPTION:  
// 
//   HISTORY:
//    10 Apr 2002  David Nason
//                 Created.
// 
// ************************************************************************

var mailaddy="info@bainbridgeballet.com";
var msg="";
var spacer = " "; 
var pos = 0; 

function DoScrollMessage()
{
	if (msg!="") {
		window.status = msg.substring(pos, msg.length) + spacer + msg.substring(0,pos); 
		pos++; 
		if (pos > msg.length)
			pos = 0;
		window.setTimeout("DoScrollMessage()", 250);
	}
} 

function ScrollMessage(init)
{
	msg=init;
	for(x=1; x<init.length; x++)
		spacer+=" ";
	DoScrollMessage();
}

function copyright_notice()
{
	document.write('Contact <a href="mailto:'+mailaddy+'">Olympic Performance Group</a> with comments and questions about this site.<br>Copyright &copy; 2007-2010 <a href="mailto:'+mailaddy+'">OPG</a>&nbsp;-&nbsp;All Rights Reserved');
}


function contact_notice()
{
	document.write('<a href="mailto:'+mailaddy+'">email: '+mailaddy+'</a>');
}


function sitedesign_notice()
{
	document.write('Website by <a href="http://www.nason.net/consultancy" target="_new">David Nason / nason.net</a> - Photos by <a href="http://www.tedleungphoto.com/" target="_new">Ted Leung Photography</a>');
}


function sitecredit_notice()
{
	document.write('Website by <a style="font-color:blue" href="http://www.nason.net/consultancy" target="_new">David Nason / nason.net</a>');
}


function photocredit_notice()
{
	document.write('Photos by <a style="color:blue" href="http://www.tedleungphoto.com/" target="_new">Ted Leung Photography</a>');
}


function relay(selObj) {
	eval("window.location='"+selObj.options[selObj.selectedIndex].value+"'");
}

var windowImage = null;
var nextImage;
nextImage = new Image();

function showImage(imageName)
{
  nextImage.src = imageName;	

	if (nextImage.complete == false)
		return;

  var imageWidth = nextImage.width;
  var imageHeight = nextImage.height;			

	var windowWidth = imageWidth + 20;
	var windowHeight = imageHeight + 80;								 

	var properties = "resizable=0,toolbar=0,top=50,left=50,scrollbars=no,width="+windowWidth+",height="+windowHeight;

	windowImage=open( nextImage.src, "windowImage", properties );
	windowImage.document.write( '<html><head><title>Gallery</title></head><body marginwidth="10" marginheight="10" topmargin="10" leftmargin="10" bgcolor ="#000000"><center><img src="' + nextImage.src + '" width="' + imageWidth + '" height="' + imageHeight + '" onclick="self.close()" alt="Click image to close window!"><form><input type="button" value="Close Window" style="background-color:#7f7f7f;" onClick="self.close()"></form></center></body></html>' );
	windowImage.document.close();
	windowImage.focus();

}

//-->
