function WM_preloadImages() {
  // Don't bother if there's no document.images
  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImages = new Array();
    // Loop through all the arguments.
    var argLength = WM_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each arg, create a new image.
      document.WM.loadedImages[arg] = new Image();
      // Then set the source of that image to the current argument.
      document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
    }
  }
}


function imagePopup(url) {
	//for cm
	window.open('/imagepopup.aspx?imageurl='+escape(url),'imagepopup','width=230,height=60,scrollbars=no,status=no,menubar=no');
}
function imagePopupWH(url, w, h) { 
    //for cm
    w=parseInt(w); h=parseInt(h);
	window.open('/imagepopup.aspx?imageurl='+escape(url),'imagepopup','width='+w+',height='+h+',scrollbars=no,status=no,menubar=no');
}

function changeImage(id) {		
	if (imgLarge) {
		imgLarge.src = aImages[id].src
		imgLarge.alt = aImages[id].alt
	}	
}

function returnObjById( id ) { 
    if (document.getElementById) 
        var returnVar = document.getElementById(id); 
    else if (document.all) 
        var returnVar = document.all[id]; 
    else if (document.layers) 
        var returnVar = document.layers[id]; 
    return returnVar; 
} 
