// main.js

function replaceImage(imageName, imageSrc) { 
	var img = new Image();
  	img.src = imageSrc;
        if(document.images[imageName])
	document.images[imageName].src = img.src;	
}

function replaceImage(imageName, imageSrc, imageAlt) { 
	var img = new Image();
  	img.src = imageSrc;
        if(document.images[imageName]){
		document.images[imageName].src = img.src;
		document.images[imageName].alt = imageAlt;	
	}
}

function vewPrintableVersion(){
	document.location.href = document.location.href + '?lg=print'
}

function printPage(){
  if(window.print)
	window.print();
}
function openImageInNewWindow(imageSrc, imageAlt) {
	winId = window.open('','','width=400,height=300');
  	winId.document.write('<body onLoad="if (window.focus) window.focus()"><center>');
  	winId.document.write('<img src="' + imgSrc + '" alt="' + imageAlt + '">');
  	winId.document.write('</center></body>');
  	winId.document.close();
  
}


