function query() {
	var f = document.getElementById("query");
	if (f.value == "")
		{ alert("Please enter a value in the Search field!"); return false; }
	else
		return true;
}
function cquery() {
	if (event.keyCode == 13)
		{ submit(); }
	else
		return false;
}
function setinfo(targetarea, trigger) {
	var defaulthtml = "<p>Simply hover over a section on the left hand side and view a detailed explaination here!</p>";
	var mdshtml = "<p>Your Master Data Source can consist of any of the following:</p><ul><li>SQL/mySQL Databases</li><li>Excel Spreadsheet, Lotus 123 Workbook, or a CSV file.</li><li>Domino/Lotus Notes Database</li></ul><p>All you need is a connection to any of the above environments to start utilizing the information stored within across your business applications!</p>";
	var envhtml = "<p>To share and eventually synchronize the data in your Master Data Source (MDS), you will need to first gain access to the MDS. Junction is designed to utilize any of the following connectivity options:</p><ul><li>ODBC Connection/ODBC User Agent(s)</li><li>Native OS-level File Access</li><li>Domino client-to-server/server-to-server connection sharing.</li></ul><p>Once you've connected to the MDS, you're ready to to sharing the data housed within with your other business solutions.</p>";
	var tarhtml = "<p>Typically a Domino/Lotus Notes database, the Target Data Source (TDS) will act as the application that allows end-users to review, report against, and otherwise utilize the information gathered from the Master Data Source (MDS).";
	var dmuhtml = "<p>Whether it's a CRM/SFA application, or a reporting database - the user community that now has the information gathered from the Master Data Source (MDS), will want to begin utilizing that data immediately! With usage and detailed review, modifications to the data will often need to be made. The current release of Junction now allows the product administrator to determine if modified MDS information can be used to update the MDS store, thus allowing the people who use the data to maintain the data!</p>";
	var junhtml = "<p>In addition to Junction's powerful yet simple-to-use data flow engine, we've packed this solution with many different and useful admin-friendly functions. Highlighed below are several new functions, but please refer to the featureset information (found later on this page) for a complete list!</p><ul><li>Scheduled Data Flow Jobs</li><li>Completely configurable data movement, including run-time calculation of data/BINDs.</li><li>Job Payload review queues with Click-To-Proceed functionality</li></ul>";
	switch (trigger)
		{
		case 'mds': { document.getElementById(targetarea).innerHTML = mdshtml; break }
		case 'env' : { document.getElementById(targetarea).innerHTML = envhtml; break }
		case 'tar' : { document.getElementById(targetarea).innerHTML = tarhtml; break }
		case 'dmu' : { document.getElementById(targetarea).innerHTML = dmuhtml; break }
		case 'jun' : { document.getElementById(targetarea).innerHTML = junhtml; break }
		default: { document.getElementById(targetarea).innerHTML = defaulthtml; break }
		}
}
function valsignup() {
	var e = document.getElementById('emailaddr');
	if (e.value == "")
		{ alert('Please enter your email address in the appropriate field in order to receive updates!'); return false; document.getElementById('emailaddr').focus(); }
	else
		{
		if ( e.value.indexOf("@") == -1 ) 
		{ alert('Please enter your complete email address in the appropriate field in order to receive updates!'); return false; document.getElementById('emailaddr').focus(); };
		if ( e.value.indexOf(".") == -1 ) 
		{ alert('Please enter your complete email address in the appropriate field in order to receive updates!'); return false; document.getElementById('emailaddr').focus(); }
		else
		{ alert('Check your email for a confirmation and future news on the Revolution!'); return true; }
		}
}
function toggle(ttype,shclass,hdclass)
	{
		var divs = document.getElementsByTagName(ttype)
		for(i=0; i < divs.length;i++)
			{
				if(divs[i].className == hdclass)
					{ divs[i].className = shclass; }
				else if(divs[i].className == shclass)
					{ divs[i].className = hdclass; }
			}
}
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }
   }
if (window.attachEvent) window.attachEvent("onload", correctPNG);
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
	newWindow=window.open(URLtoOpen, windowName, windowFeatures); 
}
function revolutionflashtour() {
	var vartoolbox = "My Toolbox<br /><br /><p>Simple drag-and-drop bookmarking of your important Contacts, critical Documents, and even Powerpoint or Excel.<br /><br />Now a single point of access to ALL of your users daily functions. Your Sales and Customer Service Reps can now work in your CRM solution, instead of keeping it minimized on their taskbar.</p>";
	var varaddressesnav = "Suite Navigation<br /><br />Mirroring the Lotus Notes 6.x Mail Database navigation system, we've implemeting a simple cross-module 'picker'-styled navigator. User adoption benefits from the logic-based flow of the application, while giving them the distict feeling that they are still within their \"Lotus Notes Mail\"!";
	var varaddresesactions = "Dynamic Actions<br /><br />While we know CRM, we concede that we do not know your organization. It's with this in mind that we developed our Dynamic Action engine.<br /><br />This innovation in Lotus Notes-client design allows for technical and non-technical power-users to add, remove and edit both Document-level and View-level actions.";
	var vardocview = "Simple yet Powerful<br /><br />Again, SIMPLE. In usability testing, we've found that the users eyes are instantly drawn to the important areas on the screen. In each content form, we have attempted to include as much information in a single area wherein 1) it makes sense to group like-fields and 2) the user would expect to see the information displayed!</p>";

	window.document.revolution_address_tour.SetVariable("vartoolbox", vartoolbox);
	window.document.revolution_address_tour.SetVariable("varaddressesnav", varaddressesnav);
	window.document.revolution_address_tour.SetVariable("varaddresesactions", varaddresesactions);
	window.document.revolution_address_tour.SetVariable("vardocview", vardocview);
}
function openpreview(trigger) {
	var attr = "height=10,width=10,status=no, titlebar=no,toolbar=no,menubar=no,location=no";
	switch (trigger)
		{
		case 'my_toolbox': { window.open("preview.html?open&preview=" + trigger + "",'Preview', attr); break }
		case 'addresses_actions': { window.open("preview.html?open&preview=" + trigger + "",'Preview', attr); break }
		case 'dbpicker': { window.open("preview.html?open&preview=" + trigger + "",'Preview', attr); break }
		case 'docview': { window.open("preview.html?open&preview=" + trigger + "",'Preview', attr); break }
		default: { return false; break }
		}
}
function PageQuery(q) {
	if(q.length > 1) this.q = q.substring(1, q.length);
		else this.q = null;
		this.keyValuePairs = new Array();
		if(q) {
			for(var i=0; i < this.q.split("&").length; i++) {
			this.keyValuePairs[i] = this.q.split("&")[i];
		}
	}
	this.getKeyValuePairs = function() { return this.keyValuePairs; }
	this.getValue = function(s) {
	for(var j=0; j < this.keyValuePairs.length; j++) {
		if(this.keyValuePairs[j].split("=")[0] == s)
			return this.keyValuePairs[j].split("=")[1];
		}
	return false;
	}
	this.getParameters = function() {
		var a = new Array(this.getLength());
		for(var j=0; j < this.keyValuePairs.length; j++) {
			a[j] = this.keyValuePairs[j].split("=")[0];
		}
	return a;
	}
	this.getLength = function() { return this.keyValuePairs.length; } 
}
function queryString(key){
	var page = new PageQuery(window.location.search); 
	return unescape(page.getValue(key)); 
}
