$(document).ready(function(){ //crear tabla de secciones Secciones=new Array(); Secciones[0]=["inicio","inicio.htm","Bienvenidos
a
ConCiencia
Consultores","img/img001.jpg"]; Secciones[1]=["servicios","servicios.htm","Servicios","img/img002.jpg"]; Secciones[2]=["especialidades","especialidades.htm","Especialidades
temáticas","img/img003.jpg"]; Secciones[3]=["organizacion","organizacion.htm","Organización","img/img004.jpg"]; Secciones[4]=["referencias","referencias.htm","Referencias","img/img005.jpg"]; Secciones[5]=["contacto","contacto.htm","Contacto","img/img006.jpg"]; Secciones[6]=["registro","formularioregistro.php","Colabore
con
nosotros","img/img000.jpg"]; Secciones[7]=["serviciosaudiovisuales","serviciosaudiovisuales.htm","Servicios:
Audiovisuales","img/img009.jpg"]; Secciones[8]=["videolagartijatibetana","videolagartijatibetana.htm","Cortometraje
"Lagartija Tibetana"","img/img010.jpg"]; Secciones[9]=["intranet","intranet.php","",""]; Secciones[10]=["fin","fin.php","",""]; //crear contenedores $("body").append('
'); //crear bloques $("#ContenedorColumna1").append(''); $("#ContenedorColumna1").append('
'); $("#ContenedorColumna1").append('
'); $("#ContenedorColumna1").append('
'); $("#ContenedorColumna2").append(''); $("#ContenedorColumna2").append('
'); $("#ContenedorPie").append('
'); //cargar contenidos $.get("login.php",function(x){$("#Login").html(x);}); $.get("colabore.htm",function(x){$("#Colabore").html(x);}); $.get("chat.php",function(x){$("#Chat").html(x);}); $.get("menu.htm",function(x){$("#Menu").html(x);}); $.get("pie.htm",function(x){$("#PieConcienciaConsultores").html(x);}); //crear array de imagenes de RotacionImagen1 ArchivosRotacionImagen1=new Array(); ArchivosRotacionImagen1.push('img/rotacion1/c226404965FAvtNc_fs (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/c2730418800034295584nJKsWJ_fs (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/c2313013820069324912mqjCUn_fs (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/c63925347WQqKIe_fs (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/c330147861PCkugl_fs (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/c2186938020080631922rPchKo_fs (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/cganzen (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/c2829208920034295584QiaRHg_fs (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/c2998706450077273384QvCNQZ_ph (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/ccomb_duck_flight_nvm (360x240).jpg');ArchivosRotacionImagen1.push('img/rotacion1/cMigratingCanadaGeese (360x240).jpg'); //crear array de imagenes de RotacionImagen2 ArchivosRotacionImagen2=new Array(); ArchivosRotacionImagen2.push('img/rotacion2/c07_11_27_pda2 (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/c2313013820069324912mqjCUn_fs (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/cganzen (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/c2186938020080631922rPchKo_fs (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/cconsulting (3) (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/ccomb_duck_flight_nvm (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/c63925347WQqKIe_fs (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/c2829208920034295584QiaRHg_fs (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/ccomputer%20group (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/c2998706450077273384QvCNQZ_ph (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/cconsulting (2) (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/c330147861PCkugl_fs (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/cWomanAtComputer (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/c2730418800034295584nJKsWJ_fs (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/c226404965FAvtNc_fs (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/cconsulting (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/cconsulting (4) (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/cGirlComputer (168x112).jpg');ArchivosRotacionImagen2.push('img/rotacion2/crechterhanddame (168x112).jpg'); IndiceActualRotacionImagen2=-1; //cargar seccion inicial IndiceSeccionActual=-1; var hTimeoutRotacionImagen1; var hTimeoutRotacionImagen2; CambiarSeccion(""); }); /*______________________________________________________debugger______________________________________________________________*/ function Debug($CadenaHtml){ if (!$("#Debug").length){ $("#Logo").after('
'); }; if ($CadenaHtml.length){$("#Debug").append($CadenaHtml+"
");} else {$("#Debug").html("");}; } /*______________________________________________________secciones web_________________________________________________________*/ //cambiar seccion function CambiarSeccion(NuevaSeccion){ IndiceNuevaSeccion=0; for (i=0;i'); $("#SeccionImagen1 img:hidden").fadeIn(3000); }; //fadeout if (Secciones[IndiceNuevaSeccion][3]==""){$("#SeccionImagen1").fadeOut(1000);}; $("#SeccionTitulo").fadeOut(1000); $("#SeccionImagen2").fadeOut(1000); $("#PieConcienciaConsultores").slideUp(200); $("#ContenedorSeccion3").fadeOut(1000,function(){ //imagen1 if (Secciones[IndiceNuevaSeccion][3]==""){$("#SeccionImagen1").remove();}; if (!$("#SeccionImagen1").length && Secciones[IndiceNuevaSeccion][3]!=""){ $("#ContenedorSeccion1").append('
'); $("#SeccionImagen1").append(''); $("#SeccionImagen1 img").show(); $("#SeccionImagen1").fadeIn(1000); }; //titulo if (Secciones[IndiceNuevaSeccion][2]==""){$("#SeccionTitulo").remove();} else { if (!$("#SeccionTitulo").length){$("#ContenedorSeccion2").append('
');}; $("#SeccionTitulo").html(Secciones[IndiceNuevaSeccion][2]); $("#SeccionTitulo").fadeIn(1000); }; //texto $("#ContenedorSeccion3").html(Contenido); if ($("#SeccionImagen2").length){IniciarRotacionImagen2();}; $("#ContenedorSeccion3").fadeIn(1000,function(){ if (IndiceNuevaSeccion==0){IniciarRotacionImagen1();}; //pie $("#PieConcienciaConsultores").slideDown(200); }); }); } }); }; }; //rotacion imagen1 function IniciarRotacionImagen1(){ IndiceActualRotacionImagen1=-1; hTimeoutRotacionImagen1=setTimeout("ContinuarRotacionImagen1()",11000); DetenerRotacionImagen1=false; } function ContinuarRotacionImagen1(){ clearTimeout(hTimeoutRotacionImagen1); if (!DetenerRotacionImagen1){ $("#SeccionImagen1 img:visible").fadeOut(5000,function(){ $("#SeccionImagen1 img:hidden").remove(); }); NumeroAleatorio=Math.floor(ArchivosRotacionImagen1.length*Math.random()); if (NumeroAleatorio==IndiceActualRotacionImagen1){ NumeroAleatorio=((NumeroAleatorio+1)%ArchivosRotacionImagen1.length); }; $("#SeccionImagen1").append(''); $("#SeccionImagen1 img:hidden").fadeIn(5000,function(){ IndiceActualRotacionImagen1=NumeroAleatorio; hTimeoutRotacionImagen1=setTimeout("ContinuarRotacionImagen1()",3000); }); }; } //rotacion imagen2 function IniciarRotacionImagen2(){ NumeroAleatorio=Math.floor(ArchivosRotacionImagen2.length*Math.random()); if (NumeroAleatorio==IndiceActualRotacionImagen2){ NumeroAleatorio=((NumeroAleatorio+1)%ArchivosRotacionImagen2.length); }; $("#SeccionImagen2").append(''); $("#SeccionImagen2 img:hidden").show(); IndiceActualRotacionImagen2=NumeroAleatorio; hTimeoutRotacionImagen2=setTimeout("ContinuarRotacionImagen2()",6000); DetenerRotacionImagen2=false; } function ContinuarRotacionImagen2(){ clearTimeout(hTimeoutRotacionImagen2); if (!DetenerRotacionImagen2){ $("#SeccionImagen2 img:visible").fadeOut(2000,function(){ $("#SeccionImagen2 img:hidden").remove(); }); NumeroAleatorio=Math.floor(ArchivosRotacionImagen2.length*Math.random()); if (NumeroAleatorio==IndiceActualRotacionImagen2){ NumeroAleatorio=((NumeroAleatorio+1)%ArchivosRotacionImagen2.length); }; $("#SeccionImagen2").append(''); $("#SeccionImagen2 img:hidden").fadeIn(2000,function(){ IndiceActualRotacionImagen2=NumeroAleatorio; hTimeoutRotacionImagen2=setTimeout("ContinuarRotacionImagen2()",3000); }); }; } /*______________________________________________________login_________________________________________________________________*/ function EnviarLogin(){ Datos=$("#FormularioLogin").serialize(); $.ajax({ async: false, type: "POST", url: "login.php", data: Datos, success: function(x){ $("#Login").html(x); }, error: function(XMLHttpRequest, textStatus, errorThrown){ alert("Ha ocurrido un error de transmisi\u00F3n. Por favor, reintente la operaci\u00F3n.\nSi el problema persiste le rogamos que se ponga en contacto con el Administrador de la p\u00E1gina web."); } }); } function EnviarLogout(){ $.ajax({ async: false, url: "logout.php", success: function(x){ CambiarSeccion("fin"); $.get("login.php",function(x){$("#Login").html(x);}); }, error: function(XMLHttpRequest, textStatus, errorThrown){ alert("Ha ocurrido un error de transmisi\u00F3n. Por favor, reintente la operaci\u00F3n.\nSi el problema persiste le rogamos que se ponga en contacto con el Administrador de la p\u00E1gina web."); } }); } /*______________________________________________________intranet______________________________________________________________*/ function CambiarIntranet(Url,Datos){ if (Url==""){$("#Intranet").html("");} else { //alert("Url: "+Url+", Datos: "+Datos); $.ajax({ async: true, type: "POST", url: Url, data: Datos, success: function(x){ $("#Intranet").html(x); }, error: function(XMLHttpRequest, textStatus, errorThrown){ alert("Ha ocurrido un error de transmisi\u00F3n. Por favor, reintente la operaci\u00F3n.\nSi el problema persiste le rogamos que se ponga en contacto con el Administrador de la p\u00E1gina web."); } }); }; }