// funciones para la web de wcusco
// Add a Favoritos
function agregar(){
if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
var url="http://www.wcusco.com";
var titulo="WCUSCO.COM - Internet Solutions";
window.external.AddFavorite(url,titulo);
}
else {
if(navigator.appName == "Netscape") 
alert ("Presione Crtl+D para agregar este sitio en sus Bookmarks");
}
}

//Mostrar Fecha
function fecha()
{
        today = new Date()
        day = today.getDay()
        if ( day == 0 ) { 
        document.write("Domingo, ");
        }
        if ( day == 1 ) { 
        document.write("Lunes, ");
        }
        if ( day == 2 ) { 
        document.write("Martes, ");
        }
        if ( day == 3 ) { 
        document.write("Miércoles, ");
        }
        if ( day == 4 ) { 
        document.write("Jueves, ");
        }
        if ( day == 5 ) { 
        document.write("Viernes, ");
        }
        if ( day == 6 ) { 
        document.write("S&aacute;bado, ");
        }
   
          today = new Date()
          hours = today.getHours()
          minutes = today.getMinutes()
          year = today.getYear()
          zerom = ''
          zeroh = ''
          if ( minutes < 10 ) { zerom = 0 }
          if ( hours < 10 ) { zeroh = 0 }
 
        if ( today.getMonth() == 0 ) { month = "Enero" }
        if ( today.getMonth() == 1 ) { month = "Febrero" }
        if ( today.getMonth() == 2 ) { month = "Marzo" }
        if ( today.getMonth() == 3 ) { month = "Abril" }
        if ( today.getMonth() == 4 ) { month = "Mayo" }
        if ( today.getMonth() == 5 ) { month = "Junio" }
        if ( today.getMonth() == 6 ) { month = "Julio" }
        if ( today.getMonth() == 7 ) { month = "Agosto" }
        if ( today.getMonth() == 8 ) { month = "Septiembre" }
        if ( today.getMonth() == 9 ) { month = "Octubre" }
        if ( today.getMonth() == 10 ) { month = "Noviembre" }
        if ( today.getMonth() == 11 ) { month = "Diciembre" }
        if ( today.getYear() == 10 ) { year = "1999" }
	if ( today.getYear() == 0 || today.getYear() == 100 || today.getYear() == 2000) { year = "2000" }

              document.write( today.getDate()," de ",month," del ",year );
}


//Abrir Ventana
var vpopup=null
function ampliar(pagina,ancho,alto){ 
vpopup = window.open(pagina,"","height="+alto+",width="+ancho+",resizable=1,noresize=0,toolbar=0,location=0,directories=0,resizable=no,status=0,menubar=0,scrollbars=0")
}

//Sistema Recomendar Web
function popUp(url){
	window.open(url,"pop","width=450,height=440,toolbars=0,scrollbars=0,status=0,menubar=0,location=0,directories=0")
}

//Solo Numeros
function LP_data(){ 
var key=window.event.keyCode;//codigo de tecla. 
if (key < 48 || key > 57){//si no es numero 
window.event.keyCode=0;//anula la entrada de texto. 
}} 

//Wcusco Copy
function derecha(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
alert('www.wcusco.com')
return false;
}

else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2)){
alert(' WCUSCO.COM\n\n Informes : info@wcusco.com\n Ventas    : ventas@wcusco.com\n\n Teléfono :  (51) 84 - 223535 \n Móvil       :  (51) 84 - 984605484\n\n          Cusco - Perú\n        © 2005 - 2010 \n')
}
}
document.onmousedown=derecha




//Array de Mensajes
// JavaScript Document
var current = 0
var x = 0
var speed = 100
var speed2 = 2000

function initArray(n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '
  }
}

typ = new initArray(7)
typ[0]="Bienvenidos a  WCUSCO.COM - Web Solutions ..."
typ[1]="Hosting Linux desde $ 1.0 al mes ..."
typ[2]="Registro de Dominios .com .net .org .info .biz .us .cc  com.pe  .net.pe .org.pe ...."
typ[3]="Diseño Web, HTML, DHTML, CSS, CGI, JavaScript, Flash, SWiSH, Gifs Animados ... "
typ[4]="Desarrollo de Aplicaciones  Web, Portales, tiendas virtuales,  PHP, ASP, ASP.NET, Perl, XML, Java, MySQL, MsSQL...."
typ[5]="Marketing Internet, Yahoo, Google, Altavista, WebCrawler, Excite ...."
typ[6]="Comercio Electrónico con Oscommerce...."

function typewrite() {
var m = typ[current]

window.status = m.substring(0, x++) + "_"

if (x == m.length + 1) {
x = 0
current++

if (current > typ.length - 1) {
current = 0
}

setTimeout("typewrite()", speed2)
}

else {
setTimeout("typewrite()", speed)
}
}

typewrite()


