function menuOvr(elem)	{ elem.firstChild.src = elem.firstChild.src.substring(0, elem.firstChild.src.lastIndexOf('.')) + '-over.gif';	}
function menuOut(elem)	{ elem.firstChild.src = elem.firstChild.src.substring(0, elem.firstChild.src.lastIndexOf('-')) + '.gif';		}
function popup(type, language, windowname, song) {
	if (language == "frBE") language = "frFR";
	if (language == "nlBE") language = "nlNL";
  if (type == 'codeGenerator') {
    popWindow = window.open('../codegen/' + language + '_instructions.jsp',windowname,'width=580,height=460,toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1');
    //alert(1);
  } else if (type == 'special') {
	popWindow = window.open('../share/special/' + language + '_index.jsp',windowname,'width=498,height=475,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'findyourway') {
	popWindow = window.open('../share/games/' + language + '_findyourway_1.html',windowname,'width=600,height=450,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'gyroids') {
	popWindow = window.open('../share/games/' + language + '_gyroids_1.html',windowname,'width=600,height=520,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'bones') {
	popWindow = window.open('../share/games/' + language + '_fossilfun_1.html',windowname,'width=600,height=520,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'fishyfun') {
	popWindow = window.open('../share/games/' + language + '_fishyfun_1.html',windowname,'width=600,height=480,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'jeepers') {
	popWindow = window.open('../share/games/' + language + '_jeepers_1.html',windowname,'width=600,height=400,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'musicmaker') {
	popWindow = window.open('../share/games/' + language + '_musicmaker_1.jsp',windowname,'width=480,height=440,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'musicmakerSong') {
	popWindow = window.open('../share/games/' + language + '_musicmaker_1.jsp?song=' + song,windowname,'width=480,height=440,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'pattern') {
	popWindow = window.open('../share/games/' + language + '_patternmaker_1.html',windowname,'width=480,height=440,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'ppoll') {
	popWindow = window.open('../share/ppoll/index.jsp?lang=' + language,windowname,'width=600,height=580,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else if (type == 'census') {
	popWindow = window.open('../share/census/index.jsp?lang=' + language,windowname,'width=600,height=550,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0');
  
  } else if (type == 'villageviews') {
	popWindow = window.open('../share/villageviews/' + language + '_index.html',windowname,'width=495,height=340,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
  
  } else {
    alert('popup: type=' + type + ', language=' + language + ', windowname=' + windowname);
  }
}

