function openpopup(url) {
	window.open(url,'acabados','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=100,height=100,screenX=80,screenY=80,top=80,left=80')
}

// --

function reemplaza (elemento, texto) {
	if (document.getElementById) {
		document.getElementById(elemento).innerHTML=texto;
	} else if (window[id]) {
		window[id].innerHTML=texto;
	}
}

// --

function reemplaza_img (elemento, imagen) {
  if (document.getElementById) {
    document.getElementById(elemento).src=imagen;
  } else if (window[id]) {
    window[id].src=imagen;
  }
}

// --
     
     
$(document).ready(function(){

	$("#header .como").hover( function() {$("#header .como img").attr('src','/w2/img_menu/como_comprar_h.gif');}, function() {$("#header .como img").attr('src','/w2/img_menu/como_comprar.gif');});
	$("#header .ver").hover( function() {$("#header .ver img").attr('src','/w2/img_menu/ver_compra_h.gif');}, function() {$("#header .ver img").attr('src','/w2/img_menu/ver_compra.gif');});

	$("#inicio").hover( function() {$("#inicio img").attr('src','/w2/img_menu/inicio-rol.png');}, function() {$("#inicio img").attr('src','/w2/img_menu/inicio.png');});
	$("#menuespecial").hover( function() {$("#menuespecial img").attr('src','/w2/img_menu/15ahorro-rol.png');}, function() {$("#menuespecial img").attr('src','/w2/img_menu/15ahorro.png');});
	$("#financiacion").hover( function() {$("#financiacion img").attr('src','/w2/img_menu/financiacion-rol.png');}, function() {$("#financiacion img").attr('src','/w2/img_menu/financiacion.png');});
	$("#preguntas").hover( function() {$("#preguntas img").attr('src','/w2/img_menu/preguntas-frecuentes-rol.png');}, function() {$("#preguntas img").attr('src','/w2/img_menu/preguntas-frecuentes.png');});
	$("#posventa").hover( function() {$("#posventa img").attr('src','/w2/img_menu/posventa-rol.png');}, function() {$("#posventa img").attr('src','/w2/img_menu/posventa.png');});
	$("#seguridad").hover( function() {$("#seguridad img").attr('src','/w2/img_menu/seguridad-rol.png');}, function() {$("#seguridad img").attr('src','/w2/img_menu/seguridad.png');});
	$("#llamamos").hover( function() {$("#llamamos img").attr('src','/w2/img_menu/llamamos-rol.png');}, function() {$("#llamamos img").attr('src','/w2/img_menu/llamamos.png');});
	$("#contacto").hover( function() {$("#contacto img").attr('src','/w2/img_menu/contacto-rol.png');}, function() {$("#contacto img").attr('src','/w2/img_menu/contacto.png');});
	$("#usuarios").hover( function() {$("#usuarios img").attr('src','/w2/img_menu/usuarios-rol.png');}, function() {$("#usuarios img").attr('src','/w2/img_menu/usuarios.png');});
	
});

// Contenido del archivo AC_RunActiveContent.js
// ----------------------------------------------
//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;      
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
