
var nickGlobal;var emailGlobal;var urlMedia='http://media.shogunsfate.com/';var cv='contenidoVariable';var timeoutAni;var estadoAni;function sfSeparadorGC(donde,ide,textoPrincipal,padding){sfTable(donde,ide+'tb',2,2);$(ide+'tb').cellPadding='0';$(ide+'tb').cellSpacing='0';$(ide+'tb').width='700px';$(ide+'tb00').width='330px';$(ide+'tb10').width='370px';sfEspacios(ide+'tb00',5);if(textoPrincipal.indexOf(".")>=0){sfBoton(ide+'tb00','','titulos/'+textoPrincipal,'',false,'');}
else{sfTexto(ide+'tb00',textoPrincipal,'','texto5blanco',false);}
$(ide+'tb00').align='left';sfDiv(ide+'tb01',ide);if(padding)
$(ide).style.padding='10px';$(ide+'tb10').height='29px';$(ide+'tb').style.backgroundImage="url(/"+urlImg+"separadores/cabeceraContenido.jpg)";$(ide+'tb').style.backgroundRepeat="no-repeat";$(ide+'tb01').colSpan='2';$(ide+'tb01').style.border='3px solid #620000';$(ide+'tb01').style.borderTop='none';$(ide+'tb11').style.display='none';sfEspacio(donde,10);}
function sfSeparadorGCSmall(donde,ide,textoPrincipal,padding){sfTable(donde,ide+'tb',2,2);$(ide+'tb').cellPadding='0';$(ide+'tb').cellSpacing='0';$(ide+'tb').width='346px';sfEspacios(ide+'tb00',5);if(textoPrincipal.indexOf(".")>=0){sfBoton(ide+'tb00','','titulos/'+textoPrincipal,'',false,'');}
else{sfTexto(ide+'tb00',textoPrincipal,'','texto5blanco',false);}
$(ide+'tb00').align='left';sfDiv(ide+'tb01',ide);if(padding)
$(ide).style.padding='10px';$(ide+'tb10').height='29px';$(ide+'tb').style.backgroundImage="url(/"+urlImg+"separadores/cabeceraContenido.jpg)";$(ide+'tb').style.backgroundRepeat="no-repeat";$(ide+'tb01').colSpan='2';$(ide+'tb01').style.border='3px solid #620000';$(ide+'tb01').style.borderTop='none';$(ide+'tb11').style.display='none';sfEspacio(donde,10);}
function focusNick(){if($("pass").value==''){$('posicionLoguin02').innerHTML='';sfInput('posicionLoguin02','pass','campo','Password',25,'password',false);}
if($("nick").value=='Nick'){$("nick").value='';}
ponerComprtamientoLigin();}
function focusPass(){if($("nick").value==''){$("nick").value='Nick';}
if($("pass").value=='Password'){$("pass").value='';var input=$("pass");var input2=input.cloneNode(false);input2.type='password';input.type='password';input.parentNode.replaceChild(input2,input);input2.focus();input2.focus();}
ponerComprtamientoLigin();}
function ponerComprtamientoLigin(){$('nick').setAttribute('onFocus',"focusNick()");$('nick').onfocus=focusNick;$('pass').setAttribute('onFocus',"focusPass()");$('pass').onfocus=focusPass;}
function pintarLogin(){$('lugarLogin').innerHTML='';$('lugarLogin').width='290px';$('lugarLogin').style.backgroundImage="url(/"+urlImg+"cabecera/supIzda.png)";$('lugarLoginDcha').style.backgroundImage="url(/"+urlImg+"cabecera/supDcha.png)";sfDiv('lugarLogin','lugarLoginAux');$('lugarLoginAux').style.padding='5px 0px 0px 30px';sfTable('lugarLoginAux','posicionLoguin',2,5);$('posicionLoguin').cellPadding='0px';$('posicionLoguin').cellSpacing='0px';sfTexto('posicionLoguin12','Forgot your password? ','olviContra','oscuro',false);$('posicionLoguin12').align='center';$('posicionLoguin10').innerHTML="<fb:login-button v=\"2\" size=\"small\" onlogin=\"verificarFacebookORegistra();\" ></fb:login-button>";FB.init(""+apiKey+"","/xd_receiver.htm");$('olviContra').setAttribute('onClick',"olvidarContra()");$('olviContra').onclick=olvidarContra;$('olviContra').style.cursor='pointer';sfInput('posicionLoguin00','nick','campo','Nick',21,'text',false);sfInput('posicionLoguin02','pass','campo','Password',21,'text',false);$('posicionLoguin00').width='160px';$('posicionLoguin01').height='3px';$('posicionLoguin03').height='5px';ponerComprtamientoLigin();sfTexto('posicionLoguin04','Regístrate','registrateLink','linksBlancos',false);$('registrateLink').setAttribute('onClick',"registro()");$('registrateLink').onclick=function(){pintarLogo();registro();pageTracker._trackPageview('/registro');};$('registrateLink').style.cursor='pointer';sfBoton('posicionLoguin04','recordar','inicio/checkNo.gif','marcarRecordar()',false,'');$('recordar').style.padding='0px 3px 0px 10px';sfBoton('posicionLoguin04','','botones/login.gif','verificarLogin()',false,'');sfDiv('posicionLoguin04','centerError','','center');$('posicionLoguin14').vAlign='Top';sfTexto('centerError','','logErrNick','textoError',false);sfTexto('centerError','','logErrPass','textoError',false);$('lugarLogin').removeAttribute('onClick');$('lugarLogin').onclick=null;}
function pintarLogo(){$('lugarLogin').innerHTML='';$('lugarLogin').style.backgroundImage="url(/"+urlImg+"cabecera/supIzdaLogo.png)";$('lugarLogin').width='290px';$('lugarLogin').style.cursor='pointer';$('lugarLogin').setAttribute('onClick','inicioConSeleccion()');$('lugarLogin').onclick=function(){inicioConSeleccion();};sfBoton('lugarLogin','guga','cabecera/kanjiReg.png','',false,'');sfColocar('guga','lugarLogin',49,-8,false);}
function inicioConSeleccion(){if(logueado){menuGeneral();}
else{pintarLogin();inicioMenu();}}
function inicioMenu(){$(cv).innerHTML='';if(cvAltura>500){sfEspacio(cv,20);}
sfTable(cv,'bordesIntro',4,4);$('bordesIntro').cellPadding='0';$('bordesIntro').cellSpacing='0';sfBoton('bordesIntro00','','registrate/logoSup.gif','',false,'');$('bordesIntro00').align='left';$('bordesIntro01').align='left';$('bordesIntro11').align='left';sfBoton('bordesIntro01','logoImg1','registrate/logoInf.gif','',false,'');sfBoton('bordesIntro11','regis','registrate/juegaGratis.gif','pintarLogo();registro();pageTracker._trackPageview(\'/registro\');',false,'');sfBoton('bordesIntro02','regisVid','registrate/verVideo0.gif','pintarLogo();multimedia();videoMenu();pageTracker._trackPageview(\'/media/video\');',false,'');$('bordesIntro02').vAlign='top';$('bordesIntro02').align='left';$('regisVid').style.padding='0px 0px 0px 190px';$('bordesIntro10').align='left';sfEspacio('bordesIntro10',20);sfTexto('bordesIntro10','What is Shogun\'s Fate? ','','texto5',true);sfTexto('bordesIntro10','Is a FREE strategy browser based game.','','texto4',true);sfTexto('bordesIntro10','Lead your province and make it prosper as its feudal lord.','','texto4',true);sfEspacio('bordesIntro10',10);if(invitadorCuenta==''){sfTexto('bordesIntro10','Fight for the Shogunate!','','texto5',true);sfTexto('bordesIntro10','Compete against thousands of players to rise as Shogun. The fate of the empire is in your hands.','','texto4',true);}else{sfTexto('bordesIntro10','You have been invited by: ','invitadoPor','textoError2',true);sfEspacio('bordesIntro10',2);sfTexto('bordesIntro10',invitadorCuenta+'','','texto6',true);$('invitadoPor').style.color='#a40003';}
$('bordesIntro00').colSpan=3;$('bordesIntro10').rowSpan=3;$('bordesIntro10').width='250px';$('bordesIntro00').width='427px';$('bordesIntro10').style.width='250px';$('bordesIntro00').style.width='427px';$('bordesIntro10').vAlign='top';$('bordesIntro11').vAlign='top';$('bordesIntro21').vAlign='top';$('bordesIntro11').style.cursor="pointer";$('regisVid').setAttribute('onMouseOver',"MM_swapImgRestore();MM_swapImage('regis','',urlImg+'registrate/verVideo1.gif',1)");$('regisVid').setAttribute('onMouseOut','MM_swapImgRestore();');$('regisVid').onmouseover=function(){MM_swapImgRestore();MM_swapImage('regisVid','',urlImg+'registrate/verVideo1.gif',1);};$('regisVid').onmouseout=MM_swapImgRestore;$('bordesIntro11').setAttribute('onMouseOver',"MM_swapImgRestore();MM_swapImage('regis','',urlImg+'registrate/juegaGratisOver.gif',1)");$('bordesIntro11').setAttribute('onMouseOut','MM_swapImgRestore();');$('bordesIntro11').onmouseover=function(){MM_swapImgRestore();MM_swapImage('regis','',urlImg+'registrate/juegaGratisOver.gif',1);};$('bordesIntro11').onmouseout=MM_swapImgRestore;$('bordesIntro02').colSpan=4;$('bordesIntro03').colSpan=4;if(cvAltura>500){$('bordesIntro02').height='50px';}
else{$('bordesIntro02').height='20px';}
sfBoton('bordesIntro03','ide0','tour/0.gif','mostrarCaptura(0)',false,'');sfBoton('bordesIntro03','ide1','tour/1.gif','mostrarCaptura(1)',false,'');sfBoton('bordesIntro03','ide2','tour/2.gif','mostrarCaptura(3)',false,'');sfBoton('bordesIntro03','ide3','tour/3.gif','mostrarCaptura(2)',false,'');sfBoton('bordesIntro03','ide4','tour/4.gif','mostrarCaptura(4)',false,'');}
function preparaCapturas(){$('capturas').innerHTML='';sfTable('capturas','bordesCap',1,3);$('bordesCap00').style.backgroundImage="url(/"+urlImg+"GC/emergenteTour/superior.jpg)";$('bordesCap00').height='30px';sfTable('bordesCap00','bordesCapTop',3,1);$('bordesCapTop00').width='70px';$('bordesCapTop10').width='500px';sfBoton('bordesCapTop20','','botones/eliminar.gif','ocultarCapturas()',false,'');$('bordesCap').cellPadding='0';$('bordesCap').cellSpacing='0';$('bordesCap01').height='310px';sfTable('bordesCap01','bordesCapX',3,1);$('bordesCapX').cellPadding='0';$('bordesCapX').cellSpacing='0';$('bordesCapX').width='100%';$('bordesCapX10').height='312px';$('bordesCapX00').width='10px';$('bordesCapX20').width='10px';sfBoton('bordesCapX00','','GC/emergenteTour/izda.gif','',false,'');sfBoton('bordesCapX20','','GC/emergenteTour/dcha.gif','',false,'');$('bordesCapX00').style.backgroundImage="url(/"+urlImg+"GC/emergenteTour/izda.gif)";$('bordesCapX20').style.backgroundImage="url(/"+urlImg+"GC/emergenteTour/dcha.gif)";$('bordesCapX10').width='586px';$('bordesCapX10').style.backgroundImage="url(/"+urlImg+"general/cargando.gif)";$('bordesCapX10').style.backgroundColor="#FFFFFF";$('bordesCapX10').style.backgroundRepeat="no-repeat";$('bordesCapX10').style.backgroundPosition="50% 50%";sfBoton('bordesCapX10','captura','','mostrarCapturaInc(1)',false,'');$('bordesCap02').height='51px';$('bordesCap02').style.backgroundImage="url(/"+urlImg+"GC/emergenteTour/inferior.jpg)";sfTable('bordesCap02','bordesCapBottom',3,1);sfEspacios('bordesCapBottom00',2);$('bordesCapBottom00').width='35x';$('bordesCapBottom10').width='540px';sfBoton('bordesCapBottom00','screenAnt','botones/anterior.gif','mostrarCapturaInc(-1)',false,'');sfBoton('bordesCapBottom20','screenSig','botones/siguiente.gif','mostrarCapturaInc(1)',false,'');sfDiv('bordesCapBottom10','contenidoEm','','center');}
function ocultarCapturas(){Effect.Fade('capturas',{duration:0.3});sfDesbloqAcciones();}
var modoCaptura;function mostrarCapturaInc(inc){if(modoCaptura){memoQueCap+=inc;mostrarCaptura(memoQueCap);}
else{memoQueScreen+=inc;mostrarScreenPopUp(memoQueScreen);}}
var memoQueCap
function mostrarCaptura(queCap){sfBloqAcciones();modoCaptura=true;$('bordesCapTop00').innerHTML='';$('contenidoEm').innerHTML='';if(queCap>6)
queCap=6;memoQueCap=queCap;try{Effect.Appear('capturas',{duration:0.5});$('captura').src='';$('captura').src=urlImg+'tour/'+queCap+'.jpg';if(queCap==0){sfTexto('contenidoEm','Shogun\'s Fate is a free multiplayer strategy game based on feudal Japan.','','textoDorado',false);}
else
if(queCap==1){sfTexto('contenidoEm','Each of the 6 factions have different characteristics and special units.','','textoDorado',false);}
else
if(queCap==2){sfTexto('contenidoEm','From the map you will see yours and other players movements. ','','textoDorado',false);}
else
if(queCap==3){sfTexto('contenidoEm','You must expand your province by constructing buildings to advance in your way to the Shogunate. ','','textoDorado',false);}
else
if(queCap==4){sfTexto('contenidoEm','Train over 40 units with different skills and characteristics for your armies.','','textoDorado',false);}
else
if(queCap==5){sfTexto('contenidoEm','Train your samurai attributes and teach him amazing skills.','','textoDorado',false);}
else
if(queCap==6){sfTexto('contenidoEm','You can arrange political events, trade resources, send ninjas, bet on sumo\'s tournaments, ... Register now for free!','','textoDorado',false);}
if(queCap>0){sfEspacios('bordesCapTop00',3);sfTexto('bordesCapTop00',(queCap+1),'','textoDorado2',false);sfTexto('bordesCapTop00','&nbsp;/&nbsp;7','','textoDorado',false);$("screenAnt").style.display='inline';}
else
$("screenAnt").style.display='none';if(queCap<6)
$("screenSig").style.display='inline';else
$("screenSig").style.display='none';}
catch(e){alert(sfProps(e));}}
var memoQueScreen
function mostrarScreenPopUp(queScreen){if(queScreen>12)
queScreen=12;memoQueScreen=queScreen;sfBloqAcciones();modoCaptura=false;$('bordesCapTop00').innerHTML='';$('contenidoEm').innerHTML='';if(queScreen==1)
sfTexto('contenidoEm','1. Choose a Faction','','textoDorado',false);else
if(queScreen==2)
sfTexto('contenidoEm','2. Build your province','','textoDorado',false);else
if(queScreen==3)
sfTexto('contenidoEm','3. Collecting ? resources','','textoDorado',false);else
if(queScreen==4)
sfTexto('contenidoEm','4. Trading pacts','','textoDorado',false);else
if(queScreen==5)
sfTexto('contenidoEm','5. The Military Way (I)','','textoDorado',false);else
if(queScreen==6)
sfTexto('contenidoEm','6. The Military Way (II)','','textoDorado',false);else
if(queScreen==7)
sfTexto('contenidoEm','7. The Politics Way ','','textoDorado',false);else
if(queScreen==8)
sfTexto('contenidoEm','8. The Subterfuge Way','','textoDorado',false);else
if(queScreen==9)
sfTexto('contenidoEm','9. The samurais (I)','','textoDorado',false);else
if(queScreen==10)
sfTexto('contenidoEm','10. The samurais (II)','','textoDorado',false);else
if(queScreen==11)
sfTexto('contenidoEm','11. The map','','textoDorado',false);else
if(queScreen==12)
sfTexto('contenidoEm','12. Start Playing!','','textoDorado',false);Effect.Appear('capturas',{duration:0.5});$('captura').src='';$('captura').src="http://media.shogunsfate.com/screenshots/"+queScreen+".jpg";$('bordesCapTop00').innerHTML='';$("screenAnt").style.display='none';$("screenSig").style.display='none';if(queScreen>0){sfEspacios('bordesCapTop00',3);sfTexto('bordesCapTop00',queScreen,'','textoDorado2',false);sfTexto('bordesCapTop00','&nbsp;/&nbsp;12','','textoDorado',false);$("screenAnt").style.display='inline';}
else
$("screenAnt").style.display='none';if(queScreen<12)
$("screenSig").style.display='inline';else
$("screenSig").style.display='none';}
function multimedia(){$(cv).innerHTML="";sfDiv(cv,'cuerpo','','');sfSeparadorGC('cuerpo','mu','media.gif',false);$('mu').align='center';sfEspacio('mu',35);sfTable('mu','colocadorImg',8,1);sfEspacio('mu',40);sfBoton('colocadorImg00','','media/artwork.gif','artwork();pageTracker._trackPageview(\'/media/artwork\');',false,'');sfBoton('colocadorImg20','','media/screenshots.gif','screenshots();pageTracker._trackPageview(\'/media/screenshots\');',false,'');sfBoton('colocadorImg40','','media/wallpapers.gif','wallpapers();pageTracker._trackPageview(\'/media/wallpapers\');',false,'');sfBoton('colocadorImg60','','media/video.gif','videoMenu();pageTracker._trackPageview(\'/media/video\');',false,'');$('colocadorImg10').width='20px';$('colocadorImg30').width='20px';$('colocadorImg50').width='20px';}
function artwork(primero){if(primero==null)
primero=0;$(cv).innerHTML="";sfSeparadorGC(cv,'ar','artwork.gif',false);$('ar').align='center';sfEspacio('ar',10);sfBoton('ar','','textos/artwork.gif','personal(4)',false,'');sfEspacios('ar',5);sfBoton('ar','','textos/firmaMerling.jpg','personal(4)',false,'');sfEspacio('ar',20);sfTable('ar','colocadorTodo',3,1);sfEspacio('ar',30);$('colocadorTodo10').width='20px';$('colocadorTodo00').width='360px';sfBoton('colocadorTodo20','','dibujos/unidades/'+(1+primero)+'.jpg','',false,'');$('colocadorTodo20').style.border="solid 5px #333333";$('colocadorTodo20').width='150px';$('colocadorTodo20').height='260px';sfTable('colocadorTodo00','colocadorGal',5,1);sfEspacio('colocadorTodo00',10);sfBoton('colocadorGal00','g0','textos/galeria.gif','artwork(0)',false,'');sfEspacios('colocadorGal00',2);sfBoton('colocadorGal00','gn0','separadores/numeros/1.gif','artwork(0)',false,'');sfBoton('colocadorGal10','g1','textos/galeria.gif','artwork(15)',false,'');sfEspacios('colocadorGal10',2);sfBoton('colocadorGal10','gn1','separadores/numeros/2.gif','artwork(0)',false,'');sfBoton('colocadorGal20','g2','textos/galeria.gif','artwork(30)',false,'');sfEspacios('colocadorGal20',2);sfBoton('colocadorGal20','gn2','separadores/numeros/3.gif','artwork(0)',false,'');Element.setOpacity('g0',0.50);Element.setOpacity('g1',0.50);Element.setOpacity('g2',0.50);Element.setOpacity('gn0',0.50);Element.setOpacity('gn1',0.50);Element.setOpacity('gn2',0.50);if(primero==0){Element.setOpacity('g0',1.00);Element.setOpacity('gn0',1.00);}
else
if(primero==15){Element.setOpacity('g1',1.00);Element.setOpacity('gn1',1.00);}
else{Element.setOpacity('g2',1.00);Element.setOpacity('gn2',1.00);}
$('colocadorGal00').width='80px';$('colocadorGal10').width='80px';$('colocadorGal20').width='80px';$('colocadorGal30').width='80px';sfTable('colocadorTodo00','colocadorImg',10,10);contador=1;for(j=0;j<=4;j+=2){for(i=0;i<=8&&(primero+contador)<=39;i+=2){sfBoton('colocadorImg'+i+''+j,'','media/artwork/'+(primero+contador)+'.jpg','cambia('+(primero+contador)+')',false,'');$('colocadorImg'+i+''+j).style.border="solid 2px #333333";contador++;}}
$('colocadorImg10').width='10px';$('colocadorImg30').width='10px';$('colocadorImg50').width='10px';$('colocadorImg70').width='10px';$('colocadorImg01').height='10px';$('colocadorImg03').height='10px';$('colocadorImg00').height='50px';$('colocadorImg02').height='50px';$('colocadorImg04').height='50px';}
function cambia(aCual){$('colocadorTodo20').innerHTML="";sfBoton('colocadorTodo20','','dibujos/unidades/'+aCual+'.jpg','',false,'');}
function screenshots(primera){if(primera==null)
primera=0;$(cv).innerHTML="";sfSeparadorGC(cv,'sc','screenshots.gif',false);$('sc').align='center';sfEspacio('sc',15);sfTable('sc','colocadorGal',4,1);sfEspacio('sc',10);sfBoton('colocadorGal00','','textos/galeria.gif','screenshots(0)',false,'');sfEspacios('colocadorGal00',2);sfBoton('colocadorGal00','','separadores/numeros/1.gif','screenshots(0)',false,'');sfBoton('colocadorGal10','','textos/galeria.gif','screenshots(1)',false,'');sfEspacios('colocadorGal10',2);sfBoton('colocadorGal10','','separadores/numeros/2.gif','screenshots(1)',false,'');sfBoton('colocadorGal20','','textos/galeria.gif','screenshots(2)',false,'');sfEspacios('colocadorGal20',2);sfBoton('colocadorGal20','','separadores/numeros/3.gif','screenshots(2)',false,'');sfBoton('colocadorGal30','','textos/galeria.gif','screenshots(3)',false,'');sfEspacios('colocadorGal30',2);sfBoton('colocadorGal30','','separadores/numeros/4.gif','screenshots(3)',false,'');$('colocadorGal00').width='80px';$('colocadorGal10').width='80px';$('colocadorGal20').width='80px';$('colocadorGal30').width='80px';Element.setOpacity('colocadorGal00',0.50);Element.setOpacity('colocadorGal10',0.50);Element.setOpacity('colocadorGal20',0.50);Element.setOpacity('colocadorGal30',0.50);if(primera==0){Element.setOpacity('colocadorGal00',1.00);}
else
if(primera==1){Element.setOpacity('colocadorGal10',1.00);}
else
if(primera==2){Element.setOpacity('colocadorGal20',1.00);}
else{Element.setOpacity('colocadorGal30',1.00);}
sfTable('sc','colocadorImg',2,1);sfTable('colocadorImg10','colocadorImgAux',2,3);$('colocadorImgAux00').colSpan='2';$('colocadorImgAux02').colSpan='2';$('colocadorImgAux01').width='210px';$('colocadorImgAux11').style.padding='5px 5px 5px 5px';$('colocadorImgAux00').style.padding='0px 5px 5px 5px';$('colocadorImgAux01').style.padding='5px 5px 5px 5px';$('colocadorImgAux02').style.padding='5px 5px 5px 5px';$('colocadorImg00').style.padding='5px 5px 5px 5px';$('colocadorImgAux00').width='250px';$('colocadorImgAux02').width='250px';$('colocadorImgAux00').style.textAlign='justify';$('colocadorImgAux01').style.textAlign='justify';$('colocadorImgAux02').style.textAlign='justify';sfBoton('colocadorImgAux00','','inicio/punto.gif','',false,'');sfEspacios('colocadorImgAux00',1);sfBoton('colocadorImgAux01','','inicio/punto.gif','',false,'');sfEspacios('colocadorImgAux01',1);sfBoton('colocadorImgAux02','','inicio/punto.gif','',false,'');sfEspacios('colocadorImgAux02',1);if(primera==0){sfBoton('colocadorImg00','i0','media/screenshots/1.gif','mostrarScreenPopUp(1)',false,'Click to enlarge.');sfEspacio('colocadorImg00',30);sfBoton('colocadorImgAux11','i1','media/screenshots/2.gif','mostrarScreenPopUp(2)',false,'Click to enlarge.');sfBoton('colocadorImg00','i2','media/screenshots/3.gif','mostrarScreenPopUp(3)',false,'Click to enlarge.');sfTexto('colocadorImgAux00','1 / 12 Choose Faction','','texto4',true);sfTexto('colocadorImgAux00','Your first step shall be choosing one of the 6 available factions. Each one has different characteristics and special units. Choose the one that best suits your playing style. ','','texto1',false);sfTexto('colocadorImgAux01','2 / 12 Build your province','','texto4',true);sfTexto('colocadorImgAux01','At first you shall have a small village which must be expanded to become a great city. The buildings will unlock the different menus of the game and improve your game in several aspects.','','texto1',false);sfTexto('colocadorImgAux02','3 / 12 Resources collection','','texto4',true);sfTexto('colocadorImgAux02','Workers are the basis of your economy. Assign them to different tasks to improve the production of resources (food, wood, iron and gold) or to accelerate the construction of buildings.','','texto1',false);}
else
if(primera==1){sfBoton('colocadorImg00','i0','media/screenshots/4.gif','mostrarScreenPopUp(4)',false,'Click to enlarge.');sfEspacio('colocadorImg00',30);sfBoton('colocadorImgAux11','i1','media/screenshots/5.gif','mostrarScreenPopUp(5)',false,'Click to enlarge.');sfBoton('colocadorImg00','i2','media/screenshots/6.gif','mostrarScreenPopUp(6)',false,'Click to enlarge.');sfTexto('colocadorImgAux00','4 / 12 Trading pacts','','texto4',true);sfTexto('colocadorImgAux00','You can exchange your resources with other players. You can also assign unemployed workers to make crafts as an extra source of resources.','','texto1',false);sfTexto('colocadorImgAux01',"5 / 12 The Military Way (I)",'','texto4',true);sfTexto('colocadorImgAux01',"When IF you conquer another player's province you will become their daimyo and you will be able to impose taxes to him. In order to achieve this, you must train military units. There are over 40 different units with different abilities and characteristics.",'','texto1',false);sfTexto('colocadorImgAux02','6 / 12 The Military Way (II)','','texto4',true);sfTexto('colocadorImgAux02','Distribute your units into armies and dessign strategies to defeat your enemies. A well balanced army is the best way to fight any opponent.','','texto1',false);}
else
if(primera==2){sfBoton('colocadorImg00','i0','media/screenshots/7.gif','mostrarScreenPopUp(7)',false,'Click to enlarge.');sfEspacio('colocadorImg00',30);sfBoton('colocadorImgAux11','i1','media/screenshots/8.gif','mostrarScreenPopUp(8)',false,'Click to enlarge.');sfBoton('colocadorImg00','i2','media/screenshots/9.gif','mostrarScreenPopUp(9)',false,'Click to enlarge.');sfTexto('colocadorImgAux00','7 / 12 The Way of Politics ','','texto4',true);sfTexto('colocadorImgAux00','You can activate political events which provide powerful benefits. You do not need great armies to reach the top.','','texto1',false);sfTexto('colocadorImgAux01','8 / 12 The Way of Subterfuge','','texto4',true);sfTexto('colocadorImgAux01','Ninjas can spy your enemies. They can also murder samurais, steal resources and poison armies. Be careful, if your ninjas are detected (found) your identity can be revealed to your enemies.','','texto1',false);sfTexto('colocadorImgAux02','9 / 12 The Samurai (I)','','texto4',true);sfTexto('colocadorImgAux02','You can create samurai with different characteristics and teach them valuable skills. Your samurai can be assigned as leaders of your armies to improve them.','','texto1',false);}
else
if(primera==3){sfBoton('colocadorImg00','i0','media/screenshots/10.gif','mostrarScreenPopUp(10)',false,'Click to enlarge.');sfEspacio('colocadorImg00',30);sfBoton('colocadorImgAux11','i1','media/screenshots/11.gif','mostrarScreenPopUp(11)',false,'Click to enlarge.');sfBoton('colocadorImg00','i2','media/screenshots/12.gif','mostrarScreenPopUp(12)',false,'Click to enlarge.');sfTexto('colocadorImgAux00','10/12 The samurai (II))','','texto4',true);sfTexto('colocadorImgAux00','The samurai may also be appointed as magistrates, helping to improve each (every) aspect of the game: economics, politics, war or ninjutsu.','','texto1',false);sfTexto('colocadorImgAux01','11/12 The map ','','texto4',true);sfTexto('colocadorImgAux01','On the map you will see yourS and your servants position , daimyos?, or enemies. Clicking on the elements you will see detailed information about your commercial trades, army movements and ninjas.','','texto1',false);sfTexto('colocadorImgAux02','12/12 Start Playing!','','texto4',true);sfTexto('colocadorImgAux02','Now you know the basis about Shogun \'s Fate, but there are a lot of things to be discovered. Shogun \'s Fate is a game of great complexity, controlling all aspects of the game is not easy. You can consult all your doubts in the wiki, or ask in the forum.','','texto1',false);}
$('i0').style.border="solid 2px #333333";$('i1').style.border="solid 2px #333333";$('i2').style.border="solid 2px #333333";sfEspacio('sc',10);}
function wallpapers(cualesMuestro){$(cv).innerHTML="";$(cv).innerHTML="";sfSeparadorGC(cv,'sc','wallpapers.gif',false);$('sc').align='center';sfEspacio('sc',20);sfTable('sc','colocadorGal',5,1);sfBoton('colocadorGal00','g0','textos/galeria.gif','wallpapers(0)',false,'');sfEspacios('colocadorGal00',2);sfBoton('colocadorGal00','gn0','separadores/numeros/1.gif','wallpapers(0)',false,'');sfBoton('colocadorGal10','g1','textos/galeria.gif','wallpapers(1)',false,'');sfEspacios('colocadorGal10',2);sfBoton('colocadorGal10','gn1','separadores/numeros/2.gif','wallpapers(1)',false,'');$('colocadorGal00').width='100px';Element.setOpacity('g0',0.50);Element.setOpacity('g1',0.50);Element.setOpacity('gn0',0.50);Element.setOpacity('gn1',0.50);if(cualesMuestro==1){Element.setOpacity('g1',1.00);Element.setOpacity('gn1',1.00);}
else{Element.setOpacity('g0',1.00);Element.setOpacity('gn0',1.00);}
sfEspacio('sc',10);sfTable('sc','colocadorImg',5,3);if(cualesMuestro==1){sfBoton('colocadorImg00','w1','media/wallpapers/oni.jpg','',false,'');sfBoton('colocadorImg30','w2','media/wallpapers/shugenja.jpg','',false,'');sfBoton('colocadorImg02','w3','media/wallpapers/tengu.jpg','',false,'');sfBoton('colocadorImg32','w4','media/wallpapers/todo.jpg','',false,'');resoluciones('colocadorImg10','oni');resoluciones('colocadorImg40','shugenja');resoluciones('colocadorImg12','tengu');resoluciones('colocadorImg42','todo');}
else{sfBoton('colocadorImg00','w1','media/wallpapers/berserker.jpg','',false,'');sfBoton('colocadorImg30','w2','media/wallpapers/estratega.jpg','',false,'');sfBoton('colocadorImg02','w3','media/wallpapers/kenshinzen.jpg','',false,'');sfBoton('colocadorImg32','w4','media/wallpapers/monje.jpg','',false,'');resoluciones('colocadorImg10','berserker');resoluciones('colocadorImg40','estratega');resoluciones('colocadorImg12','kenshinzen');resoluciones('colocadorImg42','monje');}
$('w1').style.border="solid 2px #333";$('w2').style.border="solid 2px #333";$('w3').style.border="solid 2px #333";$('w4').style.border="solid 2px #333";$('colocadorImg00').width='100px';$('colocadorImg10').width='100px';$('colocadorImg20').width='30px';$('colocadorImg30').width='100px';$('colocadorImg40').width='100px';$('colocadorImg01').height='30px';sfEspacio('sc',10);}
function resoluciones(donde,preFaccion){sfTexto(donde,' &nbsp; 1024×768',preFaccion+'1','texto1',true);sfTexto(donde,' &nbsp; 1152×864',preFaccion+'2','texto1',true);sfTexto(donde,' &nbsp; 1280×800',preFaccion+'3','texto1',true);sfTexto(donde,' &nbsp; 1280×960',preFaccion+'4','texto1',true);sfTexto(donde,' &nbsp; 1440×900',preFaccion+'5','texto1',true);sfTexto(donde,' &nbsp; 1600×1200',preFaccion+'6','texto1',true);sfTexto(donde,' &nbsp; 1680x1050',preFaccion+'7','texto1',true);$(preFaccion+'1').setAttribute('onClick',"muestraWall('wallpapers/1024x768/'"+preFaccion+"'.jpg')");$(preFaccion+'1').onclick=function(){muestraWall('wallpapers/1024x768/'+preFaccion+'.jpg');};$(preFaccion+'2').setAttribute('onClick',"muestraWall('wallpapers/1152x864/'"+preFaccion+".jpg')");$(preFaccion+'2').onclick=function(){muestraWall('wallpapers/1152x864/'+preFaccion+'.jpg');};$(preFaccion+'3').setAttribute('onClick',"muestraWall('wallpapers/1280x800/'"+preFaccion+".jpg')");$(preFaccion+'3').onclick=function(){muestraWall('wallpapers/1280x800/'+preFaccion+'.jpg');};$(preFaccion+'4').setAttribute('onClick',"muestraWall('wallpapers/1280x960/'"+preFaccion+".jpg')");$(preFaccion+'4').onclick=function(){muestraWall('wallpapers/1280x960/'+preFaccion+'.jpg');};$(preFaccion+'5').setAttribute('onClick',"muestraWall('wallpapers/1440x900/'"+preFaccion+".jpg')");$(preFaccion+'5').onclick=function(){muestraWall('wallpapers/1440x900/'+preFaccion+'.jpg');};$(preFaccion+'6').setAttribute('onClick',"muestraWall('wallpapers/1600x1200/'"+preFaccion+".jpg')");$(preFaccion+'6').onclick=function(){muestraWall('wallpapers/1600x1200/'+preFaccion+'.jpg');};$(preFaccion+'7').setAttribute('onClick',"muestraWall('wallpapers/1680x1050/'"+preFaccion+".jpg')");$(preFaccion+'7').onclick=function(){muestraWall('wallpapers/1680x1050/'+preFaccion+'.jpg');};$(preFaccion+'1').style.cursor='pointer';$(preFaccion+'2').style.cursor='pointer';$(preFaccion+'3').style.cursor='pointer';$(preFaccion+'4').style.cursor='pointer';$(preFaccion+'5').style.cursor='pointer';$(preFaccion+'6').style.cursor='pointer';$(preFaccion+'7').style.cursor='pointer';}
function muestraWall(linkImg){window.open(urlMedia+linkImg,linkImg);}
function videoMenu(){$(cv).innerHTML="";sfDiv(cv,'cuerpo','','');sfSeparadorGC('cuerpo','vi','video.gif',false);$('vi').align='center';sfEspacio('vi',20);sfTable('vi','colocadorVid',3,1);sfEspacio('vi',10);$('colocadorVid00').style.padding='5px';$('colocadorVid00').vAlign='top';sfBoton('colocadorVid00','','inicio/logoYoutube.gif','',false,'');sfEspacio('colocadorVid00',20);sfBoton('colocadorVid00','','inicio/punto.gif','',false,'');sfEspacios('colocadorVid00',2);sfTexto('colocadorVid00','Teaser video','','texto4',true);sfEspacios('colocadorVid00',5);sfTexto('colocadorVid00','[Download 29.1 MB]','aquiTxt','texto4',true);$('aquiTxt').setAttribute('onClick','window.open(\'http://media.shogunsfate.com/video/intro.mp4\');');$('aquiTxt').onclick=function(){window.open('http://media.shogunsfate.com/video/intro.mp4');};$('aquiTxt').style.cursor='pointer';$('colocadorVid00').width='196px';$('colocadorVid00').style.border="dashed 2px #aaaaaa";$('colocadorVid00').style.backgroundColor="#FFFFFF";$('colocadorVid10').width='30px';sfDiv('colocadorVid20','youtube','','');var anchuraVideo;var alturaVideo;if(sobrante>250){anchuraVideo=432;alturaVideo=350;}
else{anchuraVideo=287;alturaVideo=250;}
$('youtube').innerHTML="<object width='"+anchuraVideo+"' height='"+alturaVideo+"'><param name='movie' value='http://www.youtube.com/v/W7DPGW22S2Y?version=3'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/W7DPGW22S2Y?version=3' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='"+anchuraVideo+"' height='"+alturaVideo+"'></embed></object>";$('youtube').style.border="dashed 2px #aaaaaa";$('youtube').style.width=anchuraVideo+"px";$('cuerpo').style.height=alturaVideo+'px';}
function full(){$(cv).innerHTML="";sfDiv(cv,'cuerpo','','');sfDiv('cuerpo','contenido2','','left');sfDiv('contenido2','titulo2','','');sfBoton('titulo2','','inicio/registroUsuario.gif','',false,'');sfDiv('contenido2','texto2','','');sfEspacio('texto2','20');sfTexto('texto2','Sorry but the server is full, you can select another one with available space. ','','texto4',true);sfEspacio('texto2','20');sfTexto('texto2','Max users reached','','textoError2',false);$('cuerpo').style.height='325px';}
function closed(tiempo){$(cv).innerHTML="";sfDiv(cv,'cuerpo','','');sfDiv('cuerpo','contenido2','','left');sfDiv('contenido2','titulo2','','');sfBoton('titulo2','','inicio/registroUsuario.gif','',false,'');sfDiv('contenido2','texto2','','');sfEspacio('texto2','20');sfTexto('texto2','Sorry but the server is close, it will open in:','','texto4',true);sfEspacio('texto2','10');sfEspacios('texto2','10');sfFechaGrande('texto2',tiempo,'timeAmp',false,'registro()',true);$('cuerpo').style.height='325px';}
function closedForzado(){$(cv).innerHTML="";sfDiv(cv,'cuerpo','','');sfDiv('cuerpo','contenido2','','left');sfDiv('contenido2','titulo2','','');sfBoton('titulo2','','inicio/registroUsuario.gif','',false,'');sfDiv('contenido2','texto2','','');sfEspacio('texto2','20');sfTexto('texto2','Sorry, but the current game has been closed to new players.','','texto4',true);$('cuerpo').style.height='325px';}
function registro(){$(cv).innerHTML="";sfDiv(cv,'cuerpo','','');sfSeparadorGC('cuerpo','ru','registroDeUsuario.gif',false);sfDiv('ru','texto2','','');$('texto2').style.padding='10px';sfEspacio('texto2','10');sfTable('texto2','tablaInicio',2,1);sfTexto('tablaInicio00','Register by filling this form or use Facebook to connect.','','texto3',true);$('tablaInicio00').style.paddingRight='75px';sfBoton('tablaInicio10','','botones/conectaFacebook.gif','conectaFacebook()',false,'');sfEspacio('texto2','10');sfBoton('texto2','','registrate/bambu.gif','',false,'');sfEspacio('texto2','20');$('texto2').align='left';sfTable('texto2','wrapper',2,1);$('wrapper00').vAlign='top';sfTable('wrapper00','tabla',3,4);$('tabla00').align='left';$('tabla00').width='15px';$('tabla01').align='left';$('tabla02').align='left';$('tabla03').align='left';$('tabla10').align='left';$('tabla11').align='left';$('tabla12').align='left';$('tabla13').align='left';$('tabla20').align='left';$('tabla21').align='left';$('tabla22').align='left';$('tabla23').align='left';sfBoton('tabla00','','iconos/iconoDuda.gif','',false,'Your account name will allow you to login and have access to different games.');sfBoton('tabla01','','iconos/iconoDuda.gif','',false,'A valid email is required to play. # It will allow you to retrieve your password, receive technical support response, notices of new games and more.');sfBoton('tabla02','','iconos/iconoDuda.gif','',false,'We recommend using a long password containing numbers and letters. # Never reveal your password!.');sfBoton('tabla03','','iconos/iconoDuda.gif','',false,'Confirm your password to avoid any confusion.');sfTexto('tabla10','Account Name','','texto5',false);$('tabla10').width='130px';sfInput('tabla20','reg_nick','campo','',22,'text',false);$('tabla20').width='130px';$('tabla00').height='24px';$('tabla01').height='24px';$('tabla02').height='24px';$('tabla03').height='24px';sfTexto('tabla11','Email','','texto5',false);$('tabla21').setAttribute('colSpan',2);sfInput('tabla21','email','campo','',22,'text',false);$('tabla21').width='60px';sfTexto('tabla12','Password','','texto5',false);$('tabla22').setAttribute('colSpan',2);sfInput('tabla22','reg_pass','campo','',22,'password',false);$('tabla22').width='60px';sfTexto('tabla13','Confirm password','','texto5',false);$('tabla23').setAttribute('colSpan',2);sfInput('tabla23','reg_pass2','campo','',22,'password',false);$('tabla23').width='60px';sfTable('wrapper10','tablaSig',4,9);$('wrapper10').style.paddingLeft='20px';$('tablaSig00').vAlign='top';sfBoton('tablaSig00','','iconos/iconoDuda.gif','',false,"The security code helps us to confirm that (there aren´t) any software cheats.");sfEspacios('tablaSig00',5);sfTexto('tablaSig00','Enter the code ','','texto5',false);$('tablaSig00').align='left';sfBoton('tablaSig10','imagenCap','','registro()',true);$('imagenCap').style.width='150px';$('imagenCap').style.height='50px';sfEspacio('tablaSig10',3);$('imagenCap').src='captcha?'+Math.random()*100000;$('imagenCap').style.border="solid 2px #dddddd";$('tablaSig00').width='150px';sfInput('tablaSig10','reg_code','campo','',10,'text',false);sfEspacios('tablaSig10',3);sfBoton('tablaSig10','imagenRecarga','registrate/recargar.gif','registro()',false,'Refresh code');$('tablaSig01').setAttribute('colSpan',4);$('tablaSig01').height='33px';sfInput('tablaSig01','acepto','','','','checkbox',false);sfTexto('tablaSig01',txtLoginRegistroCondiciones,'','texto1',false);if(debug){$('reg_nick').value='aaaa';$('email').value='aaaa@.';$('reg_pass').value='aaaa';$('acepto').checked=true;}
sfTable('texto2','envioError',3,1);if(invitadorCuenta!=''){sfTexto('envioError00','You have been invited by: ','invitadoPor','textoError2',true);sfEspacio('envioError00',2);sfTexto('envioError00',invitadorCuenta+'','','texto6',true);$('invitadoPor').style.color='#a40003';}
$('envioError00').style.paddingLeft='40px';$('envioError00').width='150px';sfBoton('envioError10','imagenAcepto','registrate/enviarRegistro.gif','registroUsuario($(\'reg_nick\').value,$(\'email\').value,$(\'reg_pass\').value,$(\'acepto\').checked,$(\'reg_code\').value,$(\'reg_pass2\').value)',false,'Complete the registration ');$('envioError10').style.paddingLeft='10px';sfTexto('envioError20','','regErrNick','textoError',false);sfTexto('envioError20','','regErrEmail','textoError',false);sfTexto('envioError20','','regErrPassword','textoError',false);sfTexto('envioError20','','regErrAceptoCondiciones','textoError',false);sfTexto('envioError20','','regErrCaptcha','textoError',false);$('envioError20').style.paddingLeft='30px';sfEspacio('texto2','10');sfBoton('texto2','','registrate/bambu.gif','',false,'');}
function verificarUnicidad(nick){$('regErrNick').innerHTML="";$('img').src=urlImg+'iconos/iconoDuda.gif';if(estaBien(nick,'Nick','regErrNick','textoCorto')){if(jsonrpc.shogun.estaYaRegistradoNick(nick)){$('img').src=urlImg+'iconos/iconoError.gif';$('regErrNick').innerHTML=txtLoginRegistroVerificarNickError;}
else{$('img').src=urlImg+'iconos/iconoBien.gif';$('regErrNick').innerHTML='';}}
else{$('img').src=urlImg+'iconos/iconoError.gif';}}
function existeUsuario(nick){$('regErrNick').innerHTML="";$('img').src=urlImg+'iconos/iconoDuda.gif';if(estaBien(nick,'Nick','regErrNick','textoCorto')){if(jsonrpc.shogun.estaYaRegistradoNick(nick)){$('img').src=urlImg+'iconos/iconoBien.gif';$('regErrNick').innerHTML='';}
else{$('img').src=urlImg+'iconos/iconoError.gif';$('regErrNick').innerHTML=txtLoginPerfilVerificarNickError;}}
else{$('img').src=urlImg+'iconos/iconoError.gif';}}
var memoNick;var memoPass;function verificarLogin(cookie){nick=$('nick').value;if(cookie==null||!cookie){pass=Base64.encode(SHA1($('pass').value),'UTF_8');}
else{pass=$('pass').value;}
$('logRemotoN').value=nick;$('logRemotoP').value=pass;if(estaBien(nick,'Nick','logErrNick','textoCorto')&&estaBien(pass,'Password','logErrNick','passBase64')){navegador=comprobarNavegador();memoNick=nick;memoPass=pass;jsonrpc.login.verificarLogin(actuarLogin,nick,pass,navegador);}
return false;}
var sessionId='';function verificarFacebook(){FB.ensureInit(function(){FB.Connect.ifUserConnected(function(){sessionId=leerCookie(" "+apiKey+"_session_key");if(sessionId==null)
sessionId=leerCookie(apiKey+"_session_key");jsonrpc.login.verificarLoginFacebook(actuarLogin,sessionId,invitadorCuenta,false);},null);});}
function verificarFacebookORegistra(){FB.ensureInit(function(){FB.Connect.ifUserConnected(function(){sessionId=leerCookie(" "+apiKey+"_session_key");if(sessionId==null)
sessionId=leerCookie(apiKey+"_session_key");jsonrpc.login.verificarLoginFacebook(actuarLogin,sessionId,invitadorCuenta,true);},null);});}
function conectaFacebook(){FB.ensureInit(function(){FB.Connect.requireSession(function(){verificarFacebookORegistra();},null,true);});}
var recordar;function marcarRecordar(){recordar=!recordar;actualizarRecordar();}
function actualizarRecordar(){if(recordar){$('recordar').src=urlImg+'inicio/checkSi.gif';}
else{$('recordar').src=urlImg+'inicio/checkNo.gif';}}
function ventanaAdvertenciaNavegador(gravedad){if(gravedad==-1){mensaje="For your information\n";mensaje+="    - Shogun \'s Fate has detected that your browser's version is outdated or incompatible.\n";mensaje+="    - Some game features may not work.\n";mensaje+="    - We recommend using the latest version of Mozilla Firefox (www.getfirefox.com)";alert(mensaje);}
if(gravedad==0){mensaje="inform you before proceeding:\n";mensaje+="    - Shogun \'s Fate has detected that the version of your browser is outdated or incompatible.\n";mensaje+="    - Some game features may be undermined, but not critically.\n";mensaje+="    - We recommend using the latest version of Mozilla Firefox (www.getfirefox.com)";alert(mensaje);}}
function actuarLogin(result,exception){if(exception){try{$('logErrNick').innerHTML=exception.message;}catch(e){alert(exception.message);}}
else{if(result.correcto){if(compatibilidad=comprobarNavegador()>0){caducidad=new Date(2100,1,1,0,0,0);if(recordar){establecerCookie("nombre",memoNick,caducidad,"/","shogunsfate.com");establecerCookie("pass",memoPass,caducidad,"/","shogunsfate.com");establecerCookie("nombre",memoNick,caducidad,"/","");establecerCookie("pass",memoPass,caducidad,"/","");}
else{eliminarCookie("nombre","/","shogunsfate.com");eliminarCookie("pass","/","shogunsfate.com");eliminarCookie("nombre","/","");eliminarCookie("pass","/","");}
recienLogueado(result);}
else{ventanaAdvertenciaNavegador(compatibilidad);recienLogueado(result);}
if(result.esFacebook&&result.pedirMail){pedirPermisosEmailFB();}
if(result.alerta!=""&&result.alerta!=null){sfDialogoAdvertencia(result.alerta);}}
else{try{$('logErrNick').innerHTML=result.error;}catch(e){alert(result.error);}}}}
function pedirPermisosEmailFB(){FB.ensureInit(function(){FB.Connect.ifUserConnected(function(){FB.Connect.showPermissionDialog("email",function(perms){if(!perms){jsonrpc.gestor.quitarQuieroAvisos();}
else{jsonrpc.gestor.ponerQuieroAvisosFB(sessionId);}});},null);});}
function invitarAmigosFB(){FB.ensureInit(function(){var dialog=new FB.UI.FBMLPopupDialog('Invite your friends to play and win benefits','');var fbml="<fb:fbml>"+"<fb:request-form action=\"http://shogunsfate.com/\" method=\"POST\" invite=\"true\" type=\"Shogunsfate\" content=\"Shogun\'s Fate - The massively multiplayer game based in the feudal Japan, strategy, politics, betrayal, everything is valid to reach the Shogunate.<fb:req-choice url='http://shogunsfate.com/?invitacion="+nombrePropio+"' label='Come and play! ' />  \"> "+"<fb:multi-friend-selector email_invite=\"false\" bypass=\"cancel\"  actiontext=\"Selecciona a los amigos que quieres invitar.\" />"+"</fb:fbml>";dialog.setFBMLContent(fbml);dialog.setContentWidth(760);dialog.setContentHeight(540);dialog.show();});}
function registroUsuario(nick,email,pass,boton,codigo,pass2){if(boton){$('regErrAceptoCondiciones').innerHTML='';if(codigo==null||codigo.length<1){$('regErrCaptcha').innerHTML='Empty code';}
else{if(codigo.length!=5){$('regErrCaptcha').innerHTML='Incorrect code ';}
else{$('regErrCaptcha').innerHTML='';if(pass!=pass2){$('regErrPassword').innerHTML="Passwords don't match";}
else{if(estaBien(nick,'Nick','regErrNick','textoCorto')&&estaBien(pass,'Password','regErrPassword','textoCorto')&&estaBien(email,'Email','regErrEmail','email')){nickGlobal=nick;emailGlobal=email;jsonrpc.login.registroUsuario(actuarRegistro,nick,email,pass,codigo,linkPromo,invitadorCuenta);sfCarga('contenido2');}}}}}
else{$('regErrAceptoCondiciones').innerHTML=txtLoginRegistroAceptarCondiciones;}}
function actuarRegistro(result,exception){if(exception){registro();nickGlobal=null;emailGlobal=null;$('regErrNick').innerHTML=exception.message;}
else{if(result.correctoRegistro){quitaAyudaYa();location.replace("login?pagina=registro");}
else{nickGlobal=null;emailGlobal=null;$('regErrNick').innerHTML=result.errorNick;$('regErrEmail').innerHTML=result.errorEmail;$('regErrPassword').innerHTML=result.errorPass;$('regErrCaptcha').innerHTML=result.errorCodigo;}}}
function registroCompletado(){$('iconFacebook').style.visibility='hidden';esFacebook=false;esMixto=false;$('nombreCuenta').innerHTML=nombrePropio;$('lugarLoginDcha').style.backgroundImage="url(/"+urlImg+"cabecera/supDchaUsuario.png)";$('filaLog').style.visibility='visible';pintarLogo();logueado=true;$('logRemotoN').value=nombrePropio;$('logRemotoP').value=passPropio;$(cv).innerHTML="";sfDiv(cv,'cuerpo','','');sfDiv('cuerpo','contenido2','','left');sfDiv('contenido2','titulo2','','center');sfBoton('titulo2','','registrate/enhorabuena.gif','',true,'');sfEspacio('titulo2',20);sfBoton('titulo2','','registrate/unirseAPartida.gif','menuGeneral(false)',false,'');}
function olvidarContra(){$(cv).innerHTML="";sfDiv(cv,'cuerpo','','');sfDiv('cuerpo','contenido2','','left');sfDiv('contenido2','titulo2','','');sfBoton('titulo2','','inicio/recordar.gif','',false,'');sfDiv('contenido2','texto2','','');sfEspacio('texto2','20');sfTexto('texto2',txtLoginOlvContra1,'','texto2',true);sfEspacio('texto2','20');sfTable('texto2','tabla',4,1);sfTexto('tabla00',txtLoginOlvContra2,'','texto4',false);$('tabla00').width='135px';sfInput('tabla10','email','campo','',25,'text',false);$('tabla10').width='155px';sfBoton('tabla20','imagenAcepto','botones/aceptar.gif','enviarCorreo($(\'email\').value);',false);$('tabla20').width='110px';sfTexto('tabla30',' ','recErrEmail','textoError',false);$('tabla30').width='120px';$('cuerpo').style.height='325px';}
function enviarCorreo(email){if(estaBien(email,'Email','recErrEmail','email')){emailGlobal=email;jsonrpc.login.enviarPasswordVerificarCorreo(confirmarenvio,email);}}
function confirmarenvio(result,exception){if(result.correcto){envioConfirmado();}
else{emailGlobal=null;$('recErrEmail').innerHTML=result.error;}}
function envioConfirmado(){$(cv).innerHTML="";sfDiv(cv,'cuerpo','','');sfDiv('cuerpo','contenido2','','left');sfDiv('contenido2','titulo2','','');sfBoton('titulo2','','inicio/enviado.gif','',false,'');sfDiv('contenido2','texto2','','');sfEspacio('texto2','20');sfTexto('texto2',txtLoginOlvContraConf1,'','texto1',false);sfTexto('texto2',emailGlobal,'','texto2',false);sfTexto('texto2',txtLoginOlvContraConf2,'','texto1',false);$('cuerpo').style.height='325px';}
var ultimoIframe;function otrasPaginas(cual){if(cual=='registro'){registroCompletado();}
else{$(cv).innerHTML="";if(cual=='invitar'){sfSeparadorGC(cv,'ifraCuerp','Invite your friends',false);$('ifraCuerp').style.backgroundColor='#FFFFFF';$('ifraCuerptb').height=(cvAltura-50)+'px';$('ifraCuerptb01').height=(cvAltura-50)+'px';$('ifraCuerp').style.height=(cvAltura-50)+'px';ultimoIframe=sfIFrame('ifraCuerp','laPagina','http://inviter.shogunsfate.com/example.php?invitacion='+nombrePropio,695,(cvAltura-55)+'px',true);}else{if(cual=='phoenix'){sfSeparadorGC(cv,'ifraCuerp','Phoenix Rules',false);$('ifraCuerp').style.backgroundColor='#FFFFFF';sfEspacio('ifraCuerp','10');sfTexto('ifraCuerp',' &nbsp;List of Banned players ','lin','texto6',false);$('lin').style.cursor='pointer';$('lin').setAttribute('onClick',"listaBaneados()");$('lin').onclick=function(){listaBaneados()};$('lin').style.padding='0px 0px 0px 500px';}else{sfSeparadorGC(cv,'ifraCuerp',cual+'.gif',false);$('ifraCuerp').style.backgroundColor='#FFFFFF';}
$('ifraCuerptb').height=(cvAltura-50)+'px';$('ifraCuerptb01').height=(cvAltura-50)+'px';$('ifraCuerp').style.height=(cvAltura-50)+'px';ultimoIframe=sfIFrame('ifraCuerp','laPagina','login?pagina='+cual,695,(cvAltura-55)+'px',true);}
$('inicio').setAttribute('onClick',"location.replace(\"/\");");$('inicio').onclick=function(){location.replace("/");};pintarLogo();$('lugarLogin').setAttribute('onClick',"location.replace(\"/\");");$('lugarLogin').onclick=function(){location.replace("/");};}}
function hotKeys(event){event=(event)?event:((window.event)?event:null);if(event&&event.target)
element=event.target;else
if(event&&event.srcElement)
element=event.srcElement;if(event){var charCode=(event.charCode)?event.charCode:((event.which)?event.which:event.keyCode);if(charCode==13){verificarLogin();}}}
function listaBaneados(){jsonrpc.gestor.listadoBaneos(mostrarListaBaneos,0);}
function mostrarListaBaneos(result,exception){if(exception){alert(exception.message)}
else{$(cv).innerHTML="";sfSeparadorGC(cv,'cuerpo','List of Banned players',false);$('cuerpo').style.padding="10px 10px 10px 30px";if(result!=null){sfEspacio('cuerpo',20);if(result.length>0){sfTable('cuerpo','baneaTitulo',6,1);sfTexto('baneaTitulo00','Account Name  ','','texto3',false);$('baneaTitulo00').width='100px';sfTexto('baneaTitulo10','Date of Bane ','','texto3',false);$('baneaTitulo10').width='100px';sfTexto('baneaTitulo20','Duration ','','texto3',false);$('baneaTitulo20').width='100px';sfTexto('baneaTitulo30','Reason ','','texto3',false);$('baneaTitulo30').width='130px';sfTexto('baneaTitulo40','Game  ','','texto3',false);$('baneaTitulo40').width='130px';sfTexto('baneaTitulo50','Nick ','','texto3',false);sfEspacio('cuerpo',5);for(i=0;i<result.length;i++){pintarBaneo('cuerpo',result[i]);sfEspacio('cuerpo',2);}}
else{sfTexto('cuerpo','Has never been banned ','','texto5',true);}
sfEspacio('cuerpo',20);}
else{sfEspacio('cuerpo',20);sfTexto('cuerpo','Has never been banned','','texto5',true);sfEspacio('cuerpo',20);}}}
var desempat=0;function pintarBaneo(donde,data,noPintarNombre){desempat++;sfTable(donde,'banea'+desempat,6,1);if(noPintarNombre==null||!noPintarNombre){sfTexto('banea'+desempat+'00',data.cuenta,'','texto2',false);$('banea'+desempat+'00').width='100px';}
sfTexto('banea'+desempat+'10',data.fechaBaneo,'','texto2',false);$('banea'+desempat+'10').width='100px';sfTexto('banea'+desempat+'20',data.tiempoBaneo,'','texto2',false);$('banea'+desempat+'20').width='100px';sfTexto('banea'+desempat+'30',data.causaBaneo,'','texto2',false);$('banea'+desempat+'30').width='130px';sfTexto('banea'+desempat+'40',data.partida,'','texto2',false);$('banea'+desempat+'40').width='130px';sfTexto('banea'+desempat+'50',data.nickPartida,'','texto2',false);}
