function disableMenu(){
  return false;
}

function enableMenu(){
  return true;
}

function contextMenuInit(){
	if (document.forms['emailIdeaFile'] != 'undefined' && document.forms['emailIdeaFile'] != null){
		document.oncontextmenu = enableMenu;
	}
}
document.oncontextmenu = disableMenu;

<!--

//Show messsage for Snapshots - Upload Images page

//var state = 'none';

function showhide(layer_ref) {

	// show and hide
	//if (state == 'block') {
	//state = 'none';
	//} 
	//else {
	//state = 'block';
	//}
	
	//just show
	state = 'block';
	
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.display = state");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].display = state;
	}
	if (document.getElementById && !document.all) {
		show_hide = document.getElementById(layer_ref);
		show_hide.style.display = state;
	}
}


// Used in Snapshots Create Album page to limit the Description size

// count characters
function textLimit(field, maxlen) {
if (field.value.length > maxlen + 1)
	alert('Project Description exceeds allowed limit!');
if (field.value.length > maxlen)
	field.value = field.value.substring(0, maxlen);
}

// count words
function cnt(w){
	var y=w.value;
	var r = 0;
	a=y.replace('\n',' ');
	a=a.split(' ');
	for (z=0; z<a.length; z++) {if (a[z].length > 0) r++;}
	if (r > 500)
	alert('Project Description should not exceed 500 words!');
}

// Please wait message
function setUploadStartState() {
	var parentDiv = document.getElementById('uploading');
	parentDiv.className = "file-processing";
	parentDiv.innerHTML = "Uploading Images, please wait..." +
						"<br/>Uploading Images, please wait..." +
						"<br/>Uploading Images, please wait..." +
						"<br/>Uploading Images, please wait..." +
						"<br/>Uploading Images, please wait...";

}

// Hide something on mouseout
function mouseOverHide(str) {
     x = document.getElementById(str);
     x.style.display = 'none';
   }
// Show something on mouseover
function mouseOverShow(str) {
     x = document.getElementById(str);
     x.style.display = 'block';
   }

//disable right click / context menu in IE5 up and Netscape6 up

//Make event handler for browser dependant.
function addEvent(obj, evType, fn, useCapture){
  if (obj.addEventListener){
	    obj.addEventListener(evType, fn, useCapture);
	    return true;
  } else if (obj.attachEvent){
	    var r = obj.attachEvent("on"+evType, fn);
	    return r;
  } else {
    	alert("Handler could not be attached");
  }
}

//attach contextMenu event
addEvent(window, 'load', contextMenuInit,false);
//-->

hoverWork = function(lang){
	var li = "hps-" + lang;
	var flyout = "hps-flyout-" + lang;
	var hps = document.getElementById(li);
	hps.onmouseover = function(){
		document.getElementById(flyout).style.display = "block";
	}
	hps.onmouseout = function(){
		document.getElementById(flyout).style.display = "none";
	}
}

$(document).ready(function(){
	var hashLoc = window.location.hash;
	if (hashLoc.search('googtrans') != -1){
		$("form").each(function(){
			//alert($(this).attr('action'));
			var action = $(this).attr('action') + hashLoc
			$(this).attr('action',action)		
		})
	}
})

function submitForm(whichForm){
	$("form#memForm" + whichForm).submit();
}