// JavaScript Document
/*
A variety of functions we use on the web site 
© Tumbleweeds 2004

NewPictureWindow - opens a window with a picture and some text
*/

//NewPictureWindow
function newPictureWindow(myImage,myHeadline,myText,myShape) {
			var wHeight;
			var wWidth;
			if(myShape=="L"){
				wHeight=500;
				wWidth=550;
			}else
				{
				wHeight=700;
				wWidth=400;
				}
				
			
			myPopup = window.open("", "popup","width=" + wWidth + ",height=" + wHeight + ", left=110, top=150 scrollbars=yes resizable=yes")
			myPopup.document.write ("<HTML><HEAD><TITLE>SPORTS Web Picture</TITLE>")
			//Add a function to close the form
			myPopup.document.write("<script>")
			myPopup.document.write("function closeMe(){")
			myPopup.document.write("window.close();}")
			myPopup.document.write("</script>")
			//Stylesheet for this popup
			myPopup.document.write("<style>")
			myPopup.document.write ("body{")
			myPopup.document.write("background-color:ivory;")
			myPopup.document.write("font:Arial, Helvetica, sans-serif;")
			myPopup.document.write("color:blue;")
			myPopup.document.write("}")
			
			myPopup.document.write("p,li{font-family:Arial, Helvetica, sans-serif;")
			myPopup.document.write("font-size:14px;")
			myPopup.document.write("color:blue;")
			myPopup.document.write("text-align:center;")
			myPopup.document.write("}")
			
			myPopup.document.write("h1{font-family:Arial, Helvetica, sans-serif;")
			myPopup.document.write("font-size:24px;")
			myPopup.document.write("color:blue;")
			myPopup.document.write("text-align:center;")
			myPopup.document.write("}")
			
			myPopup.document.write("hr{color:blue;}")
			myPopup.document.write("</style>")
			//End of style sheet
			myPopup.document.write("</head><body>")
			//Heres the bit which changes
			
			myPopup.document.write("<H1>" + myHeadline + "</H1>")
			myPopup.document.write("<TABLE align='center'><TR><TD>")
			myPopup.document.write("<IMG SRC='" + myImage + "'></TD></TR>")
			myPopup.document.write("<TR><TD><p>" + myText + "</p></tr></td></table>")
			
			
			//This bit is added to play tunes which are in the config file
			myPopup.document.write("<table style='position:relative;left:30px;' align='center' width='400px'><tr><td>")
			myPopup.document.write("<tr><td>")
			myPopup.document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='400' height='130'>")
  			myPopup.document.write("<param name='movie' value='TSPlayerV2.1.swf'>")
  			myPopup.document.write("<param name='quality' value='high'>")
  			myPopup.document.write("<param name='wmode' value='transparent'>")
  			myPopup.document.write("<param name='FlashVars' value='playlistfile=rock_playlist.xml&configurationfile=configuration.xml'>")
  			myPopup.document.write("<embed src='TSPlayerV2.1.swf' quality='high' wmode='transparent' flashvars='playlistfile=rock_playlist.xml&configurationfile=configuration.xml' 	pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='400' height=	'150'></embed>")
			myPopup.document.write("</object>")
			myPopup.document.write("</td></tr></table>")
			
			myPopup.document.write("<hr>")
			myPopup.document.write("<form name='myForm'>")
			myPopup.document.write("<input type='button' value='Close' name='myButton' onclick='closeMe()'>")
			myPopup.document.write("</form>")
			
			myPopup.document.write("</body>")
			myPopup.document.write("</HTML>")
			
		}
		
//Inserts flash movies or slide shows into a pop-up window	
function newFlashWindow(mySWF,myHeadline,myText,myShape) {
			var wHeight;
			var wWidth;
			if(myShape=="L"){
				wHeight=450;
				wWidth=550;
			}else
				{
				wHeight=700;
				wWidth=400;
				}
				
			
			myPopup = window.open("", "popup","width=" + wWidth + ",height=" + wHeight + ", left=110, top=150 scrollbars=yes resizable=yes")
			myPopup.document.write ("<HTML><HEAD><TITLE>Tumbleweeds Web Flash Presentation</TITLE>")
			//Add a function to close the form
			myPopup.document.write("<script>")
			myPopup.document.write("function closeMe(){")
			myPopup.document.write("window.close();}")
			myPopup.document.write("</script>")
			//Stylesheet for this popup
			myPopup.document.write("<style>")
			myPopup.document.write ("body{")
			myPopup.document.write("background-color:ivory;")
			myPopup.document.write("font:Arial, Helvetica, sans-serif;")
			myPopup.document.write("color:blue;")
			myPopup.document.write("}")
			
			myPopup.document.write("p,li{font-family:Arial, Helvetica, sans-serif;")
			myPopup.document.write("font-size:14px;")
			myPopup.document.write("color:blue;")
			myPopup.document.write("text-align:center;")
			myPopup.document.write("}")
			
			myPopup.document.write("h1{font-family:Arial, Helvetica, sans-serif;")
			myPopup.document.write("font-size:24px;")
			myPopup.document.write("color:blue;")
			myPopup.document.write("text-align:center;")
			myPopup.document.write("}")
			
			myPopup.document.write("hr{color:blue;}")
			myPopup.document.write("</style>")
			//End of style sheet
			myPopup.document.write("</head><body>")
			//Heres the bit which changes
			
			myPopup.document.write("<H1>" + myHeadline + "</H1>")
			myPopup.document.write("<TABLE align='center'><TR><TD>")
			
			
			//Embed the flash movie / slideshow here
			myPopup.document.write("<div align=center><OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000")
			myPopup.document.write(" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH=319 HEIGHT=230>") 
			myPopup.document.write("<PARAM NAME=movie VALUE='" + mySWF + "'>")
			myPopup.document.write("<PARAM NAME=menu VALUE=false>") 
			myPopup.document.write("<PARAM NAME=quality VALUE=high>")
			myPopup.document.write("<PARAM NAME=wmode VALUE=opaque>")
			myPopup.document.write("<PARAM NAME=scale VALUE=noscale>")
			myPopup.document.write("<EMBED src='" + mySWF + "' menu=false quality=high wmode=opaque ")
 			myPopup.document.write("scale=noscale WIDTH=319 HEIGHT=230 TYPE=application/x-shockwave-flash")
			myPopup.document.write(" PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash>")
			myPopup.document.write("</EMBED>")
			myPopup.document.write("</OBJECT></TD></TR><TR><TD>&nbsp;</TD></TR>")
			myPopup.document.write("<TR><TD><p>" + myText + "</p>")
			myPopup.document.write("</TD></TR></div></TABLE>")
			
			myPopup.document.write("<hr>")
			myPopup.document.write("<form name='myForm'>")
			myPopup.document.write("<input type='button' value='Close' name='myButton' onclick='closeMe()'>")
			myPopup.document.write("</form>")
			
			myPopup.document.write("</body>")
			myPopup.document.write("</HTML>")
			
		}
		
		


