// Copyright 2001, Aaron Boodman
// This code is public domain. Please use it for good, not evil.

if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	document.writeln('<style type="text/css">img { visibility:hidden; } </style>');
	window.attachEvent("onload", fnLoadPngs);
}

	

function fnLoadPngs() {
		 
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
		if (itsAllGood && img.src.match(/\.png$/i) != null  &&  img.src.match('imagenes/opcionSgtePago.jpg') == null     ) {
		
			var src = img.src;
			var div = document.createElement("DIV");

			
			switch (img.id)
					{
					case 'botonRojo1':
					div.style.position = 'relative';
					div.style.left = "40px";//img.style.left;
					div.style.top = "-520px";//img.style.top;
					div.style.width =  "36px";
    				div.style.height = "34px";
							
					break;
					
					case 'imgRecomendar':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="460px"; //img.width + "px";
    				div.style.height ="249px";//img.height + "px";
		
					break;
					
					case 'imgRegistrar':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="400px"; //img.width + "px";
    				div.style.height ="49px";//img.height + "px";
					break;
					
					case 'imgCerrarRec':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="29px"; //img.width + "px";
    				div.style.height ="25px";//img.height + "px";
					break;
					
					case 'imgCerrarRegistro':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="29px"; //img.width + "px";
    				div.style.height ="25px";//img.height + "px";
					break;
					
					case 'imgCerrarPassUp':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="29px"; //img.width + "px";
    				div.style.height ="25px";//img.height + "px";
					break;
					
					
					case 'imgAceptarRec':
					 
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="20px"; //img.width + "px";
    				div.style.height ="25px";//img.height + "px";
					break;
					
					case 'imgAceptarRegistro':
					 
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="20px"; //img.width + "px";
    				div.style.height ="25px";//img.height + "px";
					break;				
					
					case 'imgAceptarAtencion':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="20px"; //img.width + "px";
    				div.style.height ="25px";//img.height + "px";
					break;				
					
					case 'imgAceptarPassUp':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="20px"; //img.width + "px";
    				div.style.height ="25px";//img.height + "px";
					break;				
					
					case 'imgAceptarAtencion':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="20px"; //img.width + "px";
    				div.style.height ="25px";//img.height + "px";
					break;				
					
					
					case 'imgRecomendarInf':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="460px"; //img.width + "px";
    				div.style.height ="108px";//img.height + "px";
					break;
					
					case 'imgMostrarAmigos':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="28px"; //img.width + "px";
    				div.style.height ="28px";//img.height + "px";
					break;
										
					case 'imgRecomendarMedio':
					div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="460px"; //img.width + "px";
    				div.style.height ="293px";//img.height + "px";
					break;
					
				    case 'imgPassUp':
				    div.style.position = 'absolute';
					div.style.left =0;// img.style.left;
					div.style.top =0; // img.style.top;
					//div.style.cursor = "hand";
					div.style.width ="400px"; //img.width + "px";
    				div.style.height ="84px";//img.height + "px";
					break;
					
					
					default:
					div.style.position = 'absolute';
					div.style.left = img.style.left;
					div.style.top = img.style.top;
					//div.style.cursor = "hand";
					div.style.width = img.width + "px";
    				div.style.height =img.height + "px";
					div.id = img.id;
					div.style.visibility = img.style.visibility;
					break;
					
					}//swi	
				
				
		/*	if (img.id == 'botonRojo1')
				{
				div.style.position = 'relative';
				div.style.left = "40px";//img.style.left;
				div.style.top = "-520px";//img.style.top;
				div.style.width =  "36px";
    			div.style.height = "34px";
				}
			else
				{
				

				
				if ( img.id == 'imgRecomendar' || img.id == 'imgRegistrar' )
					{
				div.style.position = 'absolute';
				div.style.left =0;// img.style.left;
				div.style.top =0; // img.style.top;
				//div.style.cursor = "hand";
				div.style.width ="400px"; //img.width + "px";
    			div.style.height ="237px";//img.height + "px";
					
					
					}
				else
					{
					
					
				div.style.position = 'absolute';
				div.style.left = img.style.left;
				div.style.top = img.style.top;
				//div.style.cursor = "hand";
				div.style.width = img.width + "px";
    			div.style.height =img.height + "px";
					
					
					}
				}*/
			div.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizing='scale')"
		
			
			img.replaceNode(div);
		
			//alert (img.id);	
		}
		
		//img.style.visibility = "visible";
	else
			{
		 
			if (   img.src.match('imagenes/opcionSgtePago.jpg') != null )	
				img.style.visibility = 'visible';	
			}

	}
}
