// Global Variables
// Call SetRootPath first to initialize them

var RootPath;	// the path to root

function SetRootPath (rootPath)
{
	RootPath = rootPath;
}

function Heading ()
{
	document.write ("<a href='" + RootPath + "forums/index.php' class='headlink'>FORUM</a> | <a href='" + RootPath + "about.html' class='headlink'>ABOUT</a> | <a href='" + RootPath + "contact.html' class='headlink'>CONTACT</a> ");
}

function FooterNav ()
{
document.write ('<a href="' + RootPath + 'index.htm" class="footer">Home</a>  |  <a href="' + RootPath + 'forums/index.php" class="footer">Forums</a>  |  <a href="' + RootPath + 'co_op/index.htm" class="footer">Code Co-op</a>  |  <a href="' + RootPath + 'cpp.html" class="footer">C++ Resources</a>  |  <a href="' + RootPath + 'freeware/index.htm" class="footer">Freeware</a>  |  <a href="' + RootPath + 'science/index.htm" class="footer">Science</a>  | <a href="' + RootPath + 'blog.html" class="footer">Blog</a>&nbsp;&nbsp;&nbsp;<a type="application/rss+xml" href="' + RootPath + 'feed.xml"><img border="0" src="' + RootPath + 'images/xml.gif" width="36" height="14" align="absmiddle" /><img border="0" src="' + RootPath + 'images/rss.png" width="36" height="14" align="absmiddle" /></a></p> <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" width="88" height="31" vspace="10" border="0" /></a></p>');
	
}
function FooterNav_Secure ()
{
document.write ('<a href="' + RootPath + 'index.htm" class="footer">Home</a>  |  <a href="' + RootPath + 'forums/index.php" class="footer">Forums</a>  |  <a href="' + RootPath + 'co_op/index.htm" class="footer">Code Co-op</a>  |  <a href="' + RootPath + 'cpp.html" class="footer">C++ Resources</a>  |  <a href="' + RootPath + 'freeware/index.htm" class="footer">Freeware</a>  |  <a href="' + RootPath + 'science/index.htm" class="footer">Science</a>  | <a href="' + RootPath + 'blog.html" class="footer">Blog</a>&nbsp;&nbsp;&nbsp;<a type="application/rss+xml" href="' + RootPath + 'feed.xml"><img border="0" src="' + RootPath + 'images/xml.gif" width="36" height="14" align="absmiddle" /><img border="0" src="' + RootPath + 'images/rss.png" width="36" height="14" align="absmiddle" /></a></p>');
	
}
//encode email addresses

function cryptic(eman,naimod,txe,nomailto)
{
	smallm = 109; smallo = 111;
	if (naimod == null)
		naimod = 'relisoft';
	if (txe == null)
		txe = String.fromCharCode(46, 99, smallo, smallm);
	ta = String.fromCharCode(64);
	yalpsid = eman + ta + naimod + txe;
	if (nomailto != null)
		document.write (yalpsid);
	else
	{
		otliam = String.fromCharCode(smallm, 97, 105, 108, 116, smallo, 58);
		document.write(yalpsid.link(otliam + yalpsid));
	}
}
 function Copyright()
 {
 	document.write ("<small>&copy; 2006 Reliable Software, LLC. All Rights reserved. <A href='" + RootPath + "index.htm'>www.relisoft.com</A> <br> <a href='" + RootPath + "privacy.html'>Privacy Policy</a></small>");
 } 

function BuyNow ()
{
	document.write ("<a href='https://www.relisoft.com/secure/'  class='coop_nav'>Buy for $149</a>");
}

//launches small descriptor window; used on vcs_breakdown page to define competitive products
	
function popitup(url)
{
	newwindow=window.open(url,'name','height=400,width=500, resizable=1, scrollbars=1');
	if (window.focus) {newwindow.focus()}
	return false;
}

function viewimage(url)
{
	newwindow=window.open(url,'name','height=500, width=800, resizable=1, scrollbars=1');
	if (window.focus) {newwindow.focus()}
	return false;
}

//onmouseover  for other sequence navigation

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
