function imgOn(imgName) {
	if (document.images) {
		document[imgName].src = "/images/" + imgName + "_on.gif";
	}
}

function imgOff(imgName) {
	if (document.images) {
		document[imgName].src = "/images/" + imgName + "_off.gif";
	}	
}

function openWindow(link, name, width, height) {
	window.open(link, name, 'width='+width+',height='+height+',top='+screen.availTop+',left='+screen.availLeft+',resizable=yes,toolbar=yes,menubar=yes,scrollbars=yes,location=yes,status=yes');
}

function openImgWin(srcImg, nameImg){
  theImage = new Image();
	theImage.src = srcImg;
	var imgHeight = theImage.height + 80;
	var imgWidth  =	theImage.width 	+ 40;
  var encSrcImg = escape(srcImg);
	var encNameImg = escape(nameImg);
	var qrystring = '?Title='+encNameImg+'&ImgName='+encSrcImg;
	var winParms = 'resizable=yes,height='+imgHeight+',width='+imgWidth;
	var winSrc = 'popup.asp'+qrystring;
  var win = window.open(winSrc, 'wshdimg', winParms, true);
}

function getDownload(typeFile) {
	var theFile;
	switch (typeFile) {
  	case 'Demo':
      theFile =	'download/RIVERMorphDemoNoTrial.exe';
  	  break;
    case 'Trial':
      theFile =	'download/RIVERMorphDemoSetup.zip';
  	  break;
	}
	window.open(theFile,'download');
}

var RM = {
	
	submitForm: function(action) {
		$("orderFormAction").value = action;
		$("orderForm").submit();
	}
	
};