function toggle( targetId ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.display == "none"){
  				target.style.display = "";
  			} else {
  				target.style.display = "none";
  			}
  	}
}
function toggleon( targetId ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.display == "none"){
  				target.style.display = "inline";
  			}
  	}
}
function toggleoff( targetId ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.display == "inline"){
  				target.style.display = "none";
  			}
  	}
}  	

function moveit( targetId, move ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.marginLeft){
  				target.style.marginLeft = "-" + move + "px";
  			} 
  	}
}

function moveitup( targetId, moveup ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.marginTop){
  				target.style.marginTop = "-" + moveup + "px";
  			} 
  	}
}

function changeImg(newImg) {

var loadingImage = '/loading.gif';

document.getElementById( 'thisimg' ).src = loadingImage;

newImg.onload = document.getElementById( 'thisimg' ).src = newImg;

}

function swapImg(newImg) {

document.getElementById( 'main-img' ).src = newImg;

}
