
function SimpleSwap(el,w){
  if (w==0) 
  {
	el.src=el.getAttribute("origsrc");
  }
  if (w==1) 
  {
	el.src=el.getAttribute("ovsrc");
  }
    

}

function SimpleSwapSetup(){
  
  var x = document.getElementsByTagName("img");
  
  for (var i=0;i<x.length;i++){
  
    var oversrc = x[i].getAttribute("src");
    
	if (!oversrc) continue;
      
	  if(oversrc.indexOf('m-')==-1) {continue; }
	  
	  if (oversrc.indexOf('m-')) 
	  {
		oversrc=oversrc.replace("m-","d-");
		
	  } 
	  
   
	
	x[i].oversrc_img = new Image();
	x[i].oversrc_img.src=oversrc;


    x[i].onmouseover = new Function("SimpleSwap(this,1);");
    x[i].onmouseout = new Function("SimpleSwap(this,0);");

	x[i].setAttribute("origsrc",x[i].src);
	x[i].setAttribute("ovsrc",oversrc);
    
  }
}

var PreSimpleSwapOnload =(window.onload)? window.onload : function(){};
window.onload = function(){PreSimpleSwapOnload(); SimpleSwapSetup();}

