// JavaScript Document

externalLinks = function () { 
	if (!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++) { 
		var anchor = anchors[i]; 
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; 
	} 
} 

viewGalleryImage = function (url,width,height) {
	
	//window.open(url);
	
	window.open(
		url,
		'enlargement',
		"toolbar=no,"
		+"location=no,"
		+"directories=no,"
		+"status=no,"
		+"menubar=no,"
		+"resizable=no,"
		+"copyhistory=no,"
		+"scrollbars=no,"
		+"width=" + width + ","
		+"height=" + height + ","
		+"left=1,"
		+"top=1"
	);
	
	return false;
	
} 

viewHomeImage = function (url,width,height) {
	
	//window.open(url);
	
	window.open(
		url,
		'enlargement',
		"toolbar=no,"
		+"location=no,"
		+"directories=no,"
		+"status=no,"
		+"menubar=no,"
		+"resizable=no,"
		+"copyhistory=no,"
		+"scrollbars=no,"
		+"width=" + width + ","
		+"height=" + height + ","
		+"left=1,"
		+"top=1"
	);
	
	return false;
	
} 


var NS = (navigator.appName=="Netscape")?true:false; 

function fitpic() { 
  iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
  iHeight = (NS)?window.innerHeight:document.body.clientHeight; 
  iWidth = document.images[0].width - iWidth; 
  iHeight = document.images[0].height - iHeight; 
  window.resizeBy(iWidth, iHeight); 
  self.focus(); 
};