    ver4 = (document.layers || document.all) ? 1 : 0;

    nav = new Array(7);
	if (document.images)
	{
	    nav = new Array (
  	        "top_home" ,
	        "top_about" ,
	        "top_contact" ,
	        "top_news" ,
	        "top_video" , 
			"top_search" ,
			"vid_of_week"
		)
	
	    images = new Array( nav.length );
	
	    for ( i = 0 ; i < nav.length ; i++ )
	    {
	        images[i] = new Image();
		    images[i].src = ("images/" + nav[i] + "_on.gif");
        }
    };

	function rollOver( imName , imTitle , over )
	{
		
	    //imName is used for most rollovers
		//imTitle is used for the left nav that has two rollovers, the second one needing to go to the titles directory
         if (!document.images) {return};
         whichIm = document.images[imName];
		 if ( imTitle == "" )
		 {
		    
		     if ( over )
		     {
		         whichIm.src = "images/" + imName + "_on.gif" ;
		     }
             else
		     {
		        if($("[@name='" + imName +  "']").attr("class") != "_on")
		        {
    		         whichIm.src = "images/" + imName + ".gif" ;
    		    }
		     }
		} 
		else
		{
		     whichImTitle = document.images[imTitle];
		     if ( over )
		     {
		         whichIm.src = "images/titles/" + imName + "_on.gif" ;
				 whichImTitle.src = "images/titles/" + imTitle + "_on.gif" ;				 
		     }
             else
		     {
		         whichIm.src = "images/titles/" + imName + ".gif" ;
				 whichImTitle.src = "images/titles/" + imTitle + ".gif" ;				 
		     }
		     
		     swapRightImgs(imTitle.replace("ep_",""), over);
		}
    }
    
    function swapRightImgs(epNo, over) {
		
		if(over) {
					
			imgObjs = { main : $('img[@src$='+screenGrabs.main+']'), right: $('img[@src$='+screenGrabs.right+']'),
					bottom: $('img[@src$='+screenGrabs.bottom+']') };
			$(imgObjs.main).attr('src', 'images/screen_grabs/'+epNo+'_main.jpg');
			$(imgObjs.right).attr('src', 'images/screen_grabs/'+epNo+'_right.gif');
			$(imgObjs.bottom).attr('src', 'images/screen_grabs/'+epNo+'_bottom.gif');
		}
		else {
			
			imgObjs = { main: $('img[@src$='+epNo+'_main.jpg]'), right: $('img[@src$='+epNo+'_right.gif]'), 
					bottom: $('img[@src$='+epNo+'_bottom.gif]') };
					
			$(imgObjs.main).attr('src', 'images/screen_grabs/'+screenGrabs.main);
			$(imgObjs.right).attr('src', 'images/screen_grabs/'+screenGrabs.right);
			$(imgObjs.bottom).attr('src', 'images/screen_grabs/'+screenGrabs.bottom);
		
		}
		
    }
	
	
	function openWin( url, width , height )
	{
	    window.open( url , "show_print" , "width=" + width + ",height=" + height + ",toolbars=0,left=50,screenX=50,screenY=50,top=50,scrollbars=yes,toolbar,menubar" );
	}
	
	
    function openWin2( url, width , height )
	{
	    window.open( url , "show_print" , "width=" + width + ",height=" + height + ",toolbars=0,left=50,screenX=50,screenY=50,top=50,scrollbars=yes" );
	}
	
	
    function RemoveIllegalHitboxCharacters( sString ) 
    {
	var rxWhiteSpace = /\s/g;
	var rxIllegal = /[&"'#$%^\*:!\\<>~;\[\]\{\}]/g;
	var sReturn = sString.replace(rxWhiteSpace,"+");
	sReturn = sReturn.replace(rxIllegal,"");

	return sReturn;
    }
