function SimpleSwap(el,which){
  el.src=el.getAttribute(which || "origsrc");
}

function SimpleSwapSetup(){
  var z = document.getElementsByTagName("img");
  for (var a=0;a<z.length;a++){
    var oversrc = z[a].getAttribute("oversrc");
    if (!oversrc) continue;
      
    // preload image
    // comment the next two lines to disable image pre-loading
    z[a].oversrc_img = new Image();
    z[a].oversrc_img.src=oversrc;
    // set event handlers
    z[a].onmouseover = new Function("SimpleSwap(this,'oversrc');");
    z[a].onmouseout = new Function("SimpleSwap(this);");
    // save original src
    z[a].setAttribute("origsrc",z[a].src);
		if(z[a].id=="imgStyle6")
		{
					z[a].src=z[a].getAttribute("oversrc");
    			z[a].onmouseover = "";
    			z[a].onmouseout = "";	
    			var lblItemStyle = document.getElementById("lblItemStyle");		
					if (lblItemStyle) {
						lblItemStyle.value=6;			
			}    					
		}	    
  }
}

function SimpleSwapSetupOnClick(){
  var y = document.getElementsByTagName("img");
  for (var b=0;b<y.length;b++){
    var oversrc = y[b].getAttribute("oversrc");
    if (!oversrc) continue;
      
    // preload image
    // comment the next two lines to disable image pre-loading
    y[b].oversrc_img = new Image();
    y[b].oversrc_img.src=oversrc;
    // set event handlers
    y[b].onmouseover = new Function("SimpleSwap(this,'oversrc');");
    y[b].onmouseout = new Function("SimpleSwap(this);");
    // save original src
    y[b].setAttribute("origsrc",y[b].src);	    
  }
}

var PreSimpleSwapOnload =(window.onload)? window.onload : function(){};
window.onload = function(){PreSimpleSwapOnload(); SimpleSwapSetup();}