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_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];}
}

function MM_displayStatusMsg(msgStr)  { //v3.0
	status=msgStr; document.MM_returnValue = true;
}

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 mmLoadMenus() {
  if (window.mm_menu_0703172323_0) return;
  window.mm_menu_0703172323_0 = new Menu("root",126,17,"Verdana, Arial, Helvetica, sans-serif",11,"#333333","#cc0000","#f2f2f2","#ffffff","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_0703172323_0.addMenuItem("ACT!&nbsp;By&nbsp;SAGE&nbsp;2006","window.open('products.asp#act', '_self');");
  mm_menu_0703172323_0.addMenuItem("SAGE&nbsp;Pastel&nbsp;Partner","window.open('products.asp?current2=true#sage', '_self');");
   mm_menu_0703172323_0.hideOnMouseOut=true;
   mm_menu_0703172323_0.menuBorder=1;
   mm_menu_0703172323_0.menuLiteBgColor='#ffffff';
   mm_menu_0703172323_0.menuBorderBgColor='#555555';
   mm_menu_0703172323_0.bgColor='#555555';

  mm_menu_0703172323_0.writeMenus();
} // mmLoadMenus()

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];}
}

function MM_displayStatusMsg(msgStr)  { //v3.0
	status=msgStr; document.MM_returnValue = true;
}

// valid form fieldboxs
function validFrm(str) 
{
  	// General declare for messages.
  	var i,p,nm,counter,condition,errors='',args,title,val;
  	counter = 0;
  	args = str.split(",");
	// loop through all the fields
  	for (i=1; i<(args.length-1); i+=2) 
  	{  
    	if (counter == 0) 
		{
    		condition=args[i+1];
	 		nm=(findObj(args[i])); 
			title=nm.name;
			check=nm.checked;
			val=nm.value;
			// check for empty fields
			if (val !="") 
	    	{
				if (condition.indexOf('P')!=-1) 
            	{
					if (val.length < 4)
					{
						errors=title+' must be at least 4 characters.\n';
						counter = i;
					}
	        	}
				else if (condition.indexOf('C')!=-1) 
            	{
                	if (check == false)
					{
						errors=title+' box is not check.\n';
						counter = i;
					}
	        	}
				// verify number
            	else if (condition.indexOf('N')!=-1) 
            	{
                	if (isNaN(val))
					{
						errors=title+' must be a number.\n';
						counter = i;
					}
	        	}
				// verify email
				else if (condition.indexOf('E')!=-1) 
				{ 
			    	p=val.indexOf('@');
					x=val.indexOf('.');
					myExp = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
				
               		// if (p<1 || p==(val.length-1)) 
			   		if(myExp.test(val) == false)
					{
						errors=title+' must be a valid e-mail address.\n';
						counter = i;
					}
				}
        	}
        	else if (condition.charAt(0) == 'V') 
			{
				errors =title+' is required.\n'; 
				counter = i;
			}
		}
  	} 
	// 	displays error message
  	if (counter != 0) 
  	{
  		alert(errors);
		nm.focus();
		return false;
  	}
  	else
  	{
	  	if (confirm("Confirm " + args[0] + "?") == 0)
	  	{
			if (args[1] == null)
			{
				return false;
			}
			else
			{
		  		(findObj(args[1])).focus();
			}
		  	return false;
	  	}
		else
		{
			return true;
		}
  	}
}

function findObj(n, d) 
{
	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=findObj(n,d.layers[i].document);
  	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

var abtus= ["director","management"];
function aboutus(id)
{
	document.getElementById(id).style.display = "block";
	document.getElementById(id + "_header").style.color = "#000000";
	document.getElementById(id + "_header").style.textDecoration = "underline";

	for(var i=0; i<abtus.length; i++)
	{
		
		if(abtus[i]!= id)
		{
			document.getElementById(abtus[i]).style.display="none";
			document.getElementById(abtus[i] + "_header").style.color = "#4378a7";
			document.getElementById(abtus[i] + "_header").style.textDecoration = "none";
		}
	}
}

var process= ["product","feedstock"];
function process(id)
{
	document.getElementById(id).style.display = "block";

	for(var i=0; i<process.length; i++)
	{
		
		if(process[i]!= id)
		{
			document.getElementById(process[i]).style.display="none";
		}
	}
}
