// scripting_ger.asp
function activaMenu(imgName,imgSrc)
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images["textomenu"+imgName].src = "images_ger/menu/menu_texto"+imgName+"ON.gif";
      document.images["menu"+imgName].src = "images_ger/menu/menu_activadoON.gif";
    }
  }
}
function desactivaMenu(imgName,imgSrc)
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images["textomenu"+imgName].src = "images_ger/menu/menu_texto"+imgName+".gif";
      document.images["menu"+imgName].src = "images_ger/menu/menu_activadoOF.gif";
    }
  }
}

layerAnt=""
function ActivaSubmenuClub(imgName,imgSrc)
{
MM_showHideLayers('desp1','','show')
MM_showHideLayers('submenu1'+imgName,'','show')
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images["imgsubm1"+imgName].src = "images/desplegableClubs_ActivoON.gif";
	  eval("Filasubm" + imgName).className="MenuClubsON"
    }
  }
}
function DesactivaSubmenuClub(imgName,imgSrc)
{
MM_showHideLayers('desp1','','show')
MM_showHideLayers('submenu1'+imgName,'','hide')

  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images["imgsubm1"+imgName].src = "images/desplegableClubs_ActivoOF.gif";
	  eval("Filasubm" + imgName).className="MenuClubsOF"
    }
  }
}
function ActivaSubmenu(imgName,fila,imgSrc)
{
MM_showHideLayers('desp'+imgName,'','show')

  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[("imgsubm"+imgName)+fila].src = "images/desplegableMenus_ActivoON.gif";
	  eval(("Filasubm" + imgName)+fila).className="MenuON"
    }
  }
}
function DesactivaSubmenu(imgName,fila,imgSrc)
{
MM_showHideLayers('desp'+imgName,'','show')
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images["imgsubm"+imgName+fila].src = "images/desplegableMenus_ActivoOF.gif";
	  eval("Filasubm" + imgName+fila).className="MenuClubsOF"
    }
  }
}

function OverMenuDer(menu){
  if (document.images){
      document.images["MenuDer"+menu+"_flecha"].src = "images/MenuDer_flecha.gif";
  }
	  eval("MenuDer"+menu).className="textosMenusDerON"
}
function OutMenuDer(menu){
  if (document.images){
      document.images["MenuDer"+menu+"_flecha"].src = "images/pixel.gif";
  }
	  eval("MenuDer"+menu).className="textosMenusDerOFF"
}
function PaginaOver(menu){
	  eval("pag"+menu).className="textosMenusDerON"
}
function PaginaOut(menu){
	  eval("pag"+menu).className="textosMenusDerOFF"
}

//Funcion js para el cambio de pagina
function goToPage(formulario,npage){
		formulario.page.value = npage;
    formulario.submit();
}

var popup="Oikea painike ei ole käytössä"; 

function noway(go) { 
	if (document.all) { 
		if (event.button == 2) { 
			alert(popup); return false; 
		} 
	} 
	if (document.layers) { 
		if (go.which == 3) { 
			alert(popup); 
			return false; 
		} 
	} 
} 
			
if (document.layers) { 
	document.captureEvents(Event.MOUSEDOWN); 
} 
document.onmousedown=noway; 

// pop_up.inc
var popUpWin=0;
function info(url){
var top=0
var left=0
var width=420
var height=437
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(url, 'ZED', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

// check_busquedas.inc
function check_busquedas(){
	var error=0;
	if (document.busqueda.patron.value=="")
	{
		alert("Kirjoita hakuteksti ");
		error=1;
	}
	
	if ( !error )
	{
		if (document.busqueda.patron.value.length<3)
		{
			alert("Hakutekstin on oltava vähintään kolmen merkin pituinen");
			error=1;
		}
	}	
	
	if (error!=1) {
		document.busqueda.submit();
	}
}

// scripting2

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


var nav4 = window.Event ? true : false;
function acceptNum(evt){	
	// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57	
	var key = nav4 ? evt.which : evt.keyCode;	
	return (key <= 13 || (key >= 48 && key <= 57));
}

function ir_pais(){
	if (busqueda.MenuPais.value != '') 	{
		if (busqueda.MenuPais.value == ' ') {window.open('philippines.asp','_blank','toolbar=no,location=no,status=no,menubar=no, scrollbars=no,resizable=no,width=300,height=180,top=400,left=400'); }
		else { (location.href = busqueda.MenuPais.value) }
	}
}

// NewWindow

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',noresizable'
win = window.open(mypage,myname,settings)
}
//-->
 	function VerNom()
	{
		var texto;
		
		texto='';
		if (document.getElementById("txt_nom") != null )
		{
		    if (document.getElementById("txt_nom").value=="")
			{
				alert("Kirjoita nimi ");
				return -2;
			}
			else
			{
				texto= texto + '&WallNom='+ document.getElementById("txt_nom").value;
			}
		}
		if (document.getElementById("txt_texto") != null )
		{
		    if (document.getElementById("txt_texto").value=="")
			{
				alert("Kirjoita teksti");
				return -2;
			}
			else
			{
				texto= texto + '&WallTexto='+ document.getElementById("txt_texto").value;
			}
		}
		if (document.getElementById("txt_numero") != null )
		{
		    if (document.getElementById("txt_numero").value=="")
			{
				alert("Syötä puhelinnumero ");
				return -2;
			}
			else
			{
				texto= texto + '&WallNumero='+ document.getElementById("txt_numero").value;
			}
		}
		if (texto!='') 
		{
		    return texto;
		}
		else
		{
		    return -1;
		}
		
    }
function popUpName(URL,auxWidth,auxHeight,auxLeft,auxTop,nom,scBars) {
	features="width="+auxWidth+",height="+auxHeight+",left="+auxLeft+",top="+auxTop+",scrollbars="+scBars;
	window.open(URL,nom,features);
}

function URLencode(sStr) {
	sStr=escape(sStr);
	sStr=sStr.replace('+', '%2B');
	sStr=sStr.replace('"', '%22');
	sStr=sStr.replace('/', '%2F');
	return sStr;
}