	//Preload rollover image
	menu_roll = new Image();
	menu_roll.src = "images/layout/menu_item_on_bg.jpg";
		
	//Item Shop Popup
	<!--
	function popCorumOnlineShop(szURL)
	{	
		window.open(szURL,'corum_shop','resizable=yes,width=622,height=770');
	}
	//-->

	/*
		// Character testing functions
		var numb = '0123456789';
		var lwr = 'abcdefghijklmnopqrstuvwxyz';
		var upr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
		 
		function isValid(parm,val) {
		  if (parm == "") return false;
		  for (i=0; i<parm.length; i++) {
		    if (val.indexOf(parm.charAt(i),0) == -1) return false;
		  }
		  return true;
		}
		 
		function isNum(parm) {return isValid(parm,numb);}
		function isLower(parm) {return isValid(parm,lwr);}
		function isUpper(parm) {return isValid(parm,upr);}
		function isAlpha(parm) {return isValid(parm,lwr+upr);}
		function isAlphanum(parm) {return isValid(parm,lwr+upr+numb);}
		
	*/

	function horizontalScrollCheck(){
		var doc_width = 950; // Width at which to start using a horizontal scrollbar
		window_width = document.viewport.getWidth();
		hscroll = document.getElementsByTagName('html')[0];

		if(window_width < doc_width){
			hscroll.style.overflowX = 'scroll';
		} else {
			hscroll.style.overflowX = 'hidden';
			// Get scroll offsets and reset x axis scroll
			var scrolly = document.viewport.getScrollOffsets()[1];
			window.scrollTo(0, scrolly);
		}
	}

	function blurThis(target){
		target.blur();
	}
	
	// On page load scripts
	Event.observe(window, 'load', function (){
		
		// Manage horizontal scroll bar
		horizontalScrollCheck(); // Check if a horizontal scrollbar is needed
		Event.observe(window, 'resize', function(){ // Add an observer for window resizing
			horizontalScrollCheck();
		});
		
		// Manage this.blur functionality for menu, banner, and right column links
		var links = document.getElementsByTagName('a');
		
		for (l=0; l < links.length; l++){
			Event.observe(links[l], 'focus', function(){
				this.blur();
			});
		}
		
		// Manage shop link popups
		Event.observe($('shop_link'), 'click', function(){
			popCorumOnlineShop('https://billing.gpotato.com/CorumOnline/ItemShopWeb/default.asp');
		});
		Event.observe($('shop_link2'), 'click', function(){
			popCorumOnlineShop('https://billing.gpotato.com/CorumOnline/ItemShopWeb/default.asp');
		});
	});
	
	/*
		// Dynamically generate header typography styles for <h2> tags
			var headers = document.getElementsByTagName("h2"); // Get the headers
			for(h=0; h < headers.length; h++){ // Loop through headers
				var newHeaderText = "";
				var headerText = headers[h].innerHTML; // Get header text
				for(c=0; c < headerText.length; c++){ // Loop through text characters
					letter = headerText.charAt(c);
					if(isUpper(letter)){ // If the letter is uppercase, wrap it with a special span tag
						letter = '<span class="header_uppercase">' + letter + '</span>';
					}
					newHeaderText = newHeaderText + letter; // Build the new inner HTML value
				}
				headers[h].innerHTML = newHeaderText; // Set the header HTML to the new value
			}  
	});
*/

function flashWrite(s,w,h,d,bg,t,f,l){

	var code = "";
    code  = "<object type=\"application/x-shockwave-flash\" ";
    code +=         "classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ";
    code +=         "codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" ";
    code +=         "width=\""+w+"\" height=\""+h+"\" id=\""+d+"\" align=\""+l+"\">";

    code += "<param name=\"movie\" value=\""+s+"\" />";
    code += "<param name=\"quality\" value=\"high\" />";
    code += "<param name=\"wmode\" value=\""+t+"\" />";
    code += "<param name=\"menu\" value=\"false\" />";
    code += "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
    code += "<param name=\"swliveconnect\" value=\"true\" />";
	code += "<param name='scale' value='"+f+"' />";
	code += "<param name='salign' value='"+l+"' />";
    code += "<embed src=\""+s+"\" quality=\"high\" "
    code +=        "wmode=\""+t+"\" "
    code +=        "bgcolor=\"#ffffff\" "
    code +=        "salign=\""+l+"\" "
    code +=        "name=\""+d+"\" "
	code +=        "movie=\""+s+"\" "
	code +=        "wmode=\""+t+"\" "
	code +=        "allowScriptAccess=\"sameDomain\" "
	code +=        "allowFullScreen=\"false\" "
    code +=        "menu=\"false\" width=\""+w+"\" height=\""+h+"\" "
    code +=        "type=\"application/x-shockwave-flash\" "
    code +=        "pluginspage=\"http://www.macromedia.com/go/getflashplayer\"> "
    code += "</embed>"
    code += "</object>"

	document.write (code);
}