
<!--

var appV	= parseInt(navigator.appVersion);
var isNS	= (navigator.appName == "Netscape");
var isIE	= (navigator.appName == "Microsoft Internet Explorer");
var w_default	= 300;
var h_default	= 400;
var PositionX	= 0;
var PositionY	= 0;
var optNN	= 'scrollbars=no,width='+w_default+',height='+h_default+',left='+PositionX+',top='+PositionY;
var optIE	= 'scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
var img_win	= null;
var _PAGE	= "./viewer.html";
var _lck	= false;

function right(e)
// ##########################################################################
{
	if (isNS && e.which > 1)
	{
		new_win.close();
		//alert("We would like to ask kindly that you download this image somewhere else.");
		return false;
	}
	else if (isIE && (event.button == 2 || event.button == 3))
	{
		new_win.close();
		//alert("We would like to ask kindly that you download this image somewhere else.");
		return false;
	}
}


function openImageWindow(imageSrc,imageTitle)
//###########################################################################
{
	var _parms	= 'directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes';
	var _windowName	= "PicViewer";
	var xp		= this.screenX;
	var yp		= this.screenY;
	
	if(_lck == true)
	{
		for(i=0;i<300;i++);
		_lck = false;
	}
	
	_lck = true;
	
	if(_PAGE)
	{
		fileName = 'viewer.html?' + escape(imageSrc) + '&amp;' + escape(imageTitle);
		img_win = window.open(fileName,_windowName,_parms);
		
	}
	
	if (img_win != null)
	{
		img_win.focus();
	}
	
	_lck = false;
}


function popOpenView(lang, book, yr, art)
//###########################################################################
{
	var im_path	= "./" + document.inklingsfocus.locator.value + "/";
	var im_name	= lang + "_" + book;
	
	if (yr != null && yr.length > 0) { im_name += "_" + yr; }
	if (art != null && art.length > 0) { im_name += "_" + art; }
	
	im_name		+= ".jpg";
	
	var im_loc	= im_path + im_name;
	var curr_url	= document.location.href;
	var last_idx	= curr_url.lastIndexOf("/");
	var image_url	= curr_url.substr(0, last_idx+1) + im_loc;
	

	openImageWindow(image_url,book);
}


function popOpenView2(lang, book, yr, art)
//###########################################################################
{
	var im_path	= "../" + document.inklingsfocus.locator.value + "/";
	var im_name	= lang + "_" + book;
	
	if (yr != null && yr.length > 0) { im_name += "_" + yr; }
	if (art != null && art.length > 0) { im_name += "_" + art; }
	
	im_name		+= ".jpg";
	
	var im_loc	= im_path + im_name;
	var curr_url	= document.location.href;
	var last_idx	= curr_url.lastIndexOf("/");
	var image_url	= curr_url.substr(0, last_idx+1) + im_loc;
	
	//alert(curr_url);
	//alert(image_url);
	
	openImageWindow(image_url,book);
}


function popOpenGallery(name)
//###########################################################################
{
	var im_path	= "./" + document.inklingsfocus.locator.value + "/photos/";
	var im_name	= name + ".jpg";
	
	var im_loc	= im_path + im_name;
	var curr_url	= document.location.href;
	var last_idx	= curr_url.lastIndexOf("/");
	var image_url	= curr_url.substr(0, last_idx+1) + im_loc;
	

	openImageWindow(image_url);
}


function popCloseView()
//###########################################################################
{
	if (img_win != null)
	{
		img_win.close();
	}
}


function popOnLoad()
{
	img_win = window.open("",_windowName,_parms);
}

function validate_form_old()
// ----------------------------------------------------------------------------
{
	var this_name		= document.form0.name.value;
	var this_email		= document.form0.email.value;
	var this_comments	= document.form0.comments.value;
	var this_code		= document.form0.code.value;
	
	if (this_name.length < 1 || this_name == "")
	{
		alert("Name is required");
		return false;
	}
	else if (this_email.length < 1 || this_email.indexOf("@") < 1 || this_email.indexOf(".") < 1)
	{
		alert("Valid email address is required");
		return false;
	}
	else if (this_comments.length < 1 || this_comments == "")
	{
		alert("Please provide your comment or note");
		return false;
	}
	else if (this_code.indexOf("JsPWQki") < 0)
	{
		alert("Invalid security code");
		return false;
	}
	
	return true;
}

// -->


