function imageErrorCD(theImage) {
   theImage.src = "images/noImgCd.gif"
}

function imageErrorCel(theImage) {
   theImage.src = "images/generico.gif"
}

function imageErrorPostal(theImage) {
   theImage.src = "images/noImgPostal.gif"
}

function imageErrorLogo(theImage) {
   theImage.src = "images/noImgLogo.gif"
}

function imageErrorJuego(theImage) {
   theImage.src = "images/noImgJuego.gif"
}

function imageErrorJuegoP(theImage) {
   theImage.src = "images/noImgJuegoP.gif"
}

function MM_openBrWindow(theURL,winName,features) {
    derecha=(screen.width-450)/2;
    arriba=(screen.height-450)/2;
    features = features+',left='+derecha+',top='+arriba;
    //features = '';
      window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function chau(){
   self.close();
} 

function showimage() {
   if (!document.images) return
   arrayHandsetInfo = document.getElementById('selModelo').options[document.getElementById('selModelo').selectedIndex].value.split("|");
   if(arrayHandsetInfo[1]!='nada'){
      //document.images.imgCel.src=arrayHandsetInfo[1];
      window.location.replace( document.links[0].href+'&modelo='+arrayHandsetInfo[0]+'&img='+arrayHandsetInfo[1] );
   }else{
      document.images.imgCel.src='./images/generico.gif';
   }
}
var cont=0;
var ventana;
function CargarFoto(img, titulo, ancho, alto){
        if(cont==1){ventana.close();ventana=null}
        derecha=(screen.width-ancho)/2;
        arriba=(screen.height-alto)/2;
        string="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";
        ventana=window.open('','ventana',string)
        ventana.document.write('<html><head><title>' +titulo+ '</title></head><body style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no" onUnload="opener.cont=0"><img src="'+img+'"></body></html>');
        ventana.document.close();
        cont++;
}

function CargarFlash(swf, titulo, ancho, alto){
        if(cont==1){ventana.close();ventana=null}
        derecha=(screen.width-ancho)/2;
        arriba=(screen.height-alto)/2;
        string="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";
        ventana=window.open('','ventana',string);
        stringSwf = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" height="300" width="400"><param name="movie" value="'+swf+'" /><param name="quality" value="high" /><param name="BGCOLOR" value="#E3E3E3" /><embed src="'+swf+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" height="300" width="400" bgcolor="#E3E3E3"></embed></object>';
        ventana.document.write('<html><head><title>' +titulo+ '</title></head><body style="overflow:hidden" marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" scroll="no" onUnload="opener.cont=0">'+stringSwf+'</body></html>');
        ventana.document.close();
        cont++;
}

function get_Elem(id){
	if (document.getElementById){ 	return document.getElementById(id);
	}else if (document.all)	{		return document.all[id];
	}else if (document.layers)	{	return document.layers[id];
	}
}

function hideUnhide(obj){ 
	div = get_Elem(obj);
	if (div.style.display=="none") {
		div.style.display="";
	}else{
		div.style.display="none";
	}
}
/*
function AlternarUser(User){ 
	Usim = get_Elem('i_'+User);
	User = get_Elem('u_'+User);
    if (User.style.display=="none") {
    	User.style.display="";
    	Usim.style.display="none";
    }else{
    	User.style.display="none";
    	Usim.style.display="";
    }
}*/