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_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_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 setStatusBar(msg) {
	window.status=msg;
	return true;
}

function getElmntByRegex(regex) {
	frm = document.forms[0];
	ecount = frm.elements.length;
        	
	for(i = 0; i < ecount; i++) {
		elmnt = frm.elements[i];
        		
		offIndex = elmnt.name.search(regex);
		if(offIndex != -1)
			return i;
	}
	
	return -1;
}

function setView(view, rp, index) {
	frm = document.forms[0];
        	
    elmntIndex = getElmntByRegex("txtView");
    if(elmntIndex != -1)
		document.forms[0].elements[elmntIndex].value = view;
	        
	elmntIndex = getElmntByRegex("txtRp");
	if(elmntIndex != -1) 
		document.forms[0].elements[3].value = rp;
	        
	elmntIndex = getElmntByRegex("txtNav");
	if(elmntIndex != -1)
		document.forms[0].elements[elmntIndex].value = index;
		                  
    frm.submit();
}

function openPopUp(url) {
    window.open(url, "", "");
}

function openNewWindow(url) {
    window.open(url, "", "WIDTH=774,HEIGHT=500,SCROLLBARS");
}

function doSearch() {
    frm = document.forms[0];
    frm.action = "http://www.cossmanufacturing.com/absolutenm/PPLsearch.aspx";
    frm.submit();
}

function PreloadImageOnBodyLoad() 
{
   MM_preloadImages('/images/home_up.gif','/images/home_over.gif','/images/industry_solution_up.gif','/images/industry_solution_over.gif','/images/company_up.gif','/images/company_over.gif','/images/partner_login_up.gif','/images/partner_login_over.gif','/images/customer_login_up.gif','/images/customer_login_over.gif','/images/news_over.gif','/images/news_up.gif','/images/services_over.gif','/images/services_up.gif','/images/infocenter_over.gif','/images/infocenter_up.gif','/images/products_over.gif','/images/products_up.gif','/images/alliances_over.gif','/images/alliances_up.gif','/images/leftpanel/left_background.jpg','/images/new/gradient_right.gif','/images/new/gradient_left.gif','/images/new/gradient.gif');
}

function AllianceOnMouseOver()
{
	MM_swapImage('Alliances','','/images/alliances_over.gif',1);
}
function NewsEventsOnMouseOver()
{
	MM_swapImage('News','','/images/news_over.gif',1);
}
function ServicesOnMouseOver()
{
	MM_swapImage('Services','','/images/services_over.gif',1);
}
function ProductsOnMouseOver()
{
	MM_swapImage('Products','','/images/products_over.gif',1);
}
function IndustrySolutionsOnMouseOver()
{
	MM_swapImage('Industry_solution','','/images/industry_solution_over.gif',1);
}
function CompanyOnMouseOver()
{
	MM_swapImage('Company','','/images/company_over.gif',1);
}
function SiteMapOnMouseOver()
{
	MM_swapImage('Site Map','','/images/site_map_over.gif',1);
}
function ContactUsOnMouseOver()
{
	MM_swapImage('Contact Us','','/images/contact_us_over.gif',1);
}
function InfoCenterOnMouseOver()
{
	MM_swapImage('Infocenter','','/images/infocenter_over.gif',1);
}
function PartnerLoginOnMouseOver()
{
	MM_swapImage('Partner Login','','/images/partner_login_over.gif',1);
}
function CustomerLoginOnMouseOver()
{
	MM_swapImage('Customer Login','','/images/customer_login_over.gif',1);
}
function HomeOnMouseOver()
{
	MM_swapImage('Home','','/images/home_over.gif',1);
}