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

function showhidden( targetId ){
  if (document.getElementById){
  		target = document.getElementById( targetId );
  			if (target.style.overflow == "auto"){
  				target.style.overflow = "hidden";
  			}
  	}
}  	

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

function OpenNewWindow(mypage,w,h,myname){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
settings = 'height=' + h + ', width=' + w + ', left=' + winl + ', top=' + wint + ', scrollbars=0, resizeable=0, toolbar=0, location=0, menubar=0, status=0';
win = window.open(mypage,myname,settings);
if (parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function OpenFullWindow(mypage){
var winw = screen.width;
var winh = screen.height;
allsettings = 'height=' + winh + ', width=' + winw + ', left=0, top=0, resizeable=yes, scrollbars=no, toolbar=0, location=0, menubar=0, status=0';
fullwin = window.open(mypage,'',allsettings);
if (parseInt(navigator.appVersion) >= 4){fullwin.window.focus();}
}

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;

}