function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v;
	obj.backgroundImage = "url(images/fonbot.jpg)"; }
}
function despliega(idd,idtd,act) { //v9.0
  with(document){
  var celmb = getElementById(idtd);
		var celm = getElementById(idd);
		
		with(celmb){
		if(act == 'visible'){
		style.color='#ffffff';
		style.cursor='pointer';
		style.backgroundImage="url('images/fonbot.jpg')";
		}else{
		style.color='#333333';
		style.backgroundImage="url('images/fonbot1.jpg')";
		}
		}
		with(celm){
		style.visibility = act;
		}
		
	}
}

function coloriza(src){
	with(document){
		var cel = getElementById(src);
		with(cel){
		 	style.backgroundColor="#cccccc";
			style.cursor='pointer';
			style.color='#ffffff';
			}
	}
}

function decol(src)
{
	with(document)
	{
		var cel = getElementById(src);
		with(cel)
		{
		 	style.backgroundColor="#ffffff";
			style.color='#999999';
			
		}
	}
}

function popup (id) {
	var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, width=465, height=600, top=85, left=140";
	window.open("viewprod.php?id="+id,"",opciones);
}   

function resize_image(image, w) {

    if (typeof(image) != 'object') image = document.getElementById(image);

        w = (h / image.clientHeight) * image.clientWidth;

        h = (w / image.clientWidth) * image.clientHeight;

    image.style['height'] = h + 'px';
    image.style['width'] = w + 'px';
    return;
}

