function hola() {
	alert(location.hostname);
}

var newwindow = '';
var iPagina = 0;


//abre una ventana dentro de la misma
function go(jsm){
	var menujs=eval('document.jsmenu'+jsm+'.jsm'+jsm);
	if(menujs.options[menujs.selectedIndex].value!=" "){
	location=menujs.options[menujs.selectedIndex].value
	}
} 
	
		
function sig2(jsm){
	var menujs=eval('document.jsmenu'+jsm+'.jsm'+jsm);
	if (menujs.selectedIndex < 6)
	{
		if(menujs.options[menujs.selectedIndex+1].value!=" "){
		location=menujs.options[menujs.selectedIndex+1].value;
		}
	}
	else
	{
		location=menujs.options[0].value;
	}
}

function ant2(jsm){
	var menujs=eval('document.jsmenu'+jsm+'.jsm'+jsm);
	if (menujs.selectedIndex > 0)
	{
	  if(menujs.options[menujs.selectedIndex-1].value!=" "){	
	    location=menujs.options[menujs.selectedIndex-1].value;
	   }
	 }
}



function webring(){
	var iNDX = 0;
	
	newwindow = window
	
   	document.write('<form name="jsmenu1" action="javascript:void(null)" method="post">');
	document.write('<table width="75" border="1" cellpadding="2" cellspacing="0" bordercolor="#999999">');
				
	document.write('<tr><td bgcolor="#3366CC"><p align="center"><font color="#FFFFFF" size="1" face="Georgia, Times New Roman, Times, serif">Anillo de Rob&oacute;tica</font></td><td bgcolor="#FFFFFF"></p>');
	document.write('<select name="jsm1">');

	document.write('<option ');
	if(newwindow.location.href == "http://www.xbot.es/webs/robotika/Principal.html"){document.write(' selected');iPagina = iNDX; iNDX++; };	
	document.write(' value="http://www.robotika.xbot.es" >Robotika</option> ');

	document.write('<option ');
	if(newwindow.location.href == "http://www.zerobots.net/principal.html/"){document.write(' selected');iPagina = iNDX; iNDX++; };	
	document.write(' value="http://www.zerobots.net/principal.html">Zerobots</option>');

	//document.write('<option ');
	//if(newwindow.location.href == "http://www.roboticaeducativa.com/"){document.write(' selected');iPagina = iNDX; iNDX++; };	


	document.write(' value="http://www.roboticaeducativa.com/">Robótica Educativa</option>');

	document.write('<option ');
	if(newwindow.location.href == "http://www.dutten.com.ar/"){document.write(' selected');iPagina = iNDX; iNDX++; };	
	document.write(' value="http://www.dutten.com.ar/">Dutten</option>');

	
    document.write('<option ');
	if(newwindow.location.href == "http://utic.inti.gov.ar/proyectos/sumar/") {document.write(' selected');iPagina = iNDX; iNDX++; };
	document.write(' value="http://utic.inti.gov.ar/proyectos/sumar/">Proyecto SUMAR</option>');
	
	//document.write('<option ');
	//if(newwindow.location.href == "http://www.roboliga.edu.ar/rob-objetivos.htm")	{document.write(' selected');iPagina = iNDX; iNDX++; };
	//document.write(' value="http://www.roboliga.com.ar/">Roboliga</option>');
		
	document.write('<option ');
	if(newwindow.location.href == "http://www.todorobot.com.ar/") {document.write(' selected');iPagina = iNDX; iNDX++; };
	document.write(' value="http://www.todorobot.com.ar/">TodoRobot</option>');
	
	document.write('<option ');
	if(location.hostname == "www.robotia.com.ar" || location.hostname == "robotia.com.ar"  || location.hostname == "www.8bytes.com.ar" || location.hostname == "8-b.com.ar" || location.hostname == "www.8-b.com.ar")	{document.write(' selected');;iPagina = iNDX; iNDX++; };
	document.write(' value="http://www.robotia.com.ar/">RobotIA</option>');

	document.write('<option ');
	if(newwindow.location.href == "http://www.igluppiweb.com.ar/" ) {document.write(' selected');;iPagina = iNDX; iNDX++; };
	document.write(' value="http://www.igluppiweb.com.ar">TodoLogo</option>');
	
	//document.write('<option ');
	//if(newwindow.location.href == "http://www.yorobot.org/cgi-bin/inicio.cgi"){document.write(' selected');;iPagina = iNDX; iNDX++; };	
	//document.write(' value="http://www.yorobot.org">Yorobot (Grupo RPC1)</option>');
	

	document.write('</select><input type="button" value="  Ir  " onclick="go(1)">');
    document.write('</td><td  bgcolor="#FFFFFF">');
	document.write('<input type="button" value="Anterior" onclick="ant2(1)">');
	document.write('<input type="button" value="Siguiente" onclick="sig2(1)">');
	document.write('</td><td bgcolor="#3366CC"><a href="mailto:robotia@8bytes.com.ar"><font color="#FFFFFF" size="1" face="Georgia, Times New Roman, Times, serif">Agregar</font></a>');
	document.write('</td></tr>');
	document.write('<tr><td bgcolor="#3366CC" colspan="4"><p align="center"><a href="' + newwindow.location.href + '" target="_blank"><font color="#FFFFFF" size="1" face="Georgia, Times New Roman, Times, serif">' + newwindow.location.href + '</font></td></a></p></tr>');
    document.write('</table></form>');
}
