
//Script for MENU
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (document.all) { //MS IE
	if (window.attachEvent) window.attachEvent("onload", sfHover);
	else { //IE 5.2 Mac does not support attachEvent
		var old = window.onload;
		window.onload = function() { if (old) old(); sfHover(); }
	}
}

// JavaScript Document
function setActiveClass(e)
{
document.getElementById(e).className="activeMenu";
}

// JavaScript Document
function setSubMenuActiveClass(e)
{
document.getElementById(e).className="subMenuActive";
}

function popUp(url) {
  var win = window.open( url,'Team_Statistic','menubar=no,scrollbars=yes,width=670,height=600');
  win.focus();
}

function showStatus(url){

}

function setOdd(comboElement) {
 j=0;
for (i = -3.5; i < 4.0; i = i + 0.25) {
   comboElement.options[j++] = new Option( i, i, true, false);
}
}
function setScore(comboElement) {
	j=0;
for (i = -1; i < 10; i++) {
   comboElement.options[j++] = new Option( i, i, true, false);
}
}
function setPeriod(comboElement) {
	j = 0;
   comboElement.options[j++] = new Option( 'All', 'All', true, true); 
   comboElement.options[j++] = new Option( 'Season 05/06', '1122825600000T1151683200000', false, false);    
   comboElement.options[j++] = new Option( 'Season 06/07', '1154361600000T1183219200000', false, false); 
   comboElement.options[j++] = new Option( 'Season 07/08', '1185897600000T1214755200000', false, false); 	
   comboElement.options[j++] = new Option( 'Season 08/09', '1217520000000T1246291200000', false, false);
   comboElement.options[j++] = new Option( 'Season 09/10', '1249419600000T1277845200000', false, false);  
/* <edit date="Jul 26 2010"> */
   comboElement.options[j++] = new Option( 'Season 10/11', '1281146400000T1307404740000', false, false);
/* </edit> */   
}

// 7th Aug 2010 02.00am - 1281146400
// 7th Jun 2011 11.59pm - 1307404740

function setSeason(comboElement) {
   j = 0;
/* <edit date="Jul 26 2010"> */
   comboElement.options[j++] = new Option( 'Season 10/11', '1281146400000T1307404740000', true, true);
   comboElement.options[j++] = new Option( 'Season 09/10', '1249419600000T1277845200000', false, false);
   //comboElement.options[j++] = new Option( 'Season 09/10', '1249419600000T1277845200000', true, true);
/* </edit> */
   comboElement.options[j++] = new Option( 'Season 08/09', '1217520000000T1246291200000', false, false); 		
   comboElement.options[j++] = new Option( 'Season 07/08', '1185897600000T1214755200000', false, false); 	
   comboElement.options[j++] = new Option( 'Season 06/07', '1154361600000T1183219200000', false, false);    	
   comboElement.options[j++] = new Option( 'Season 05/06', '1122825600000T1151683200000', false, false);        
}

function setSelectIndex(sel, val) {
     for (i=0;i<sel.options.length;i++) {
        if (sel.options[i].value == val) {
           sel.selectedIndex = i;
           break;
        }
     }
  }


function setCountry(comboElement) {
	j = 0;
   comboElement.options[j++] = new Option( 'England', 'England', false, false);
   comboElement.options[j++] = new Option( 'France', 'France', false, false);          
   comboElement.options[j++] = new Option( 'Germany', 'Germany', false, false);  
   comboElement.options[j++] = new Option( 'Greece', 'Greece', false, false);    
   comboElement.options[j++] = new Option( 'Holland', 'Holland', false, false);     
   comboElement.options[j++] = new Option( 'Italy', 'Italy', false, false);  
   comboElement.options[j++] = new Option( 'Portugal', 'Portugal', false, false);     
   comboElement.options[j++] = new Option( 'Spain', 'Spain', false, false);     
   comboElement.options[j++] = new Option( 'Europe', 'Europe', false, false);      
   comboElement.options[j++] = new Option( 'World', 'World', false, false);      
}

function setTypeName(comboElement) {
	j = 0;
   comboElement.options[j++] = new Option( 'All', 'All', true, true);
   comboElement.options[j++] = new Option( 'BundesLiga', 'BundesLiga', false, false);   
   comboElement.options[j++] = new Option( 'Carling Cup', 'Carling Cup', false, false);          
   comboElement.options[j++] = new Option( 'Coppa Italy', 'Coppa Italy', false, false);  
   comboElement.options[j++] = new Option( 'EPL', 'EPL', false, false);    
   comboElement.options[j++] = new Option( 'England FA Cup', 'FA Cup', false, false);     
   comboElement.options[j++] = new Option( 'Euro 2008', 'Euro08 Qualify', false, false);     
   comboElement.options[j++] = new Option( 'Friendly', 'Friendly', false, false);     
   comboElement.options[j++] = new Option( 'Italy Serie A', 'ISA', false, false);   
   comboElement.options[j++] = new Option( 'Spanish Cup', 'Spanish Cup', false, false);   
   comboElement.options[j++] = new Option( 'Spain Primera', 'SPL', false, false);   
   comboElement.options[j++] = new Option( 'UEFA Champion League', 'UEFA CL', false, false);   
   comboElement.options[j++] = new Option( 'UEFA Europa League', 'UEFA Europa League', false, false);  
   comboElement.options[j++] = new Option( 'WC06 Final', 'WC06 Final', false, false);     
}
