function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}

function setcookie(c_name, c_value)
{
  document.cookie = c_name + "=" + c_value;
}

function setHomeFlash(c_name, c_value, c_image, obj)
{
var flashCookie = getCookie(c_name);
if(flashCookie == c_value)
{
document.getElementById(obj).innerHTML= '<img src="' + c_image + '"/>';	
}
	else
	{
		setcookie(c_name, c_value);
	}
}

function setfunctioncookie(c_name, c_value)
{
  document.cookie = c_name + "=" + c_value; 
  expires="Thu, 2 Aug 2020";
}

window.onload=function() 
{
	var features = new Array(5);
	
features[0] = '<strong>New Address Standards Effective March 2009!</strong><br>&nbsp;<a href="/feature/mailing.shtml" style="padding-left:20px"><img src="/feature/images/PS_require.jpg" alt="New Address Standards Effective March 2009!!" name="sideImg" border=0 id="sideImg2" title="New Address Standards Effective March 2009!" /><br/><a href="/feature/mailing.shtml" style="float:right">MORE</a>';

features[1] = '<strong></strong><br>&nbsp;<a href="/feature/images/fsc.shtml" style="padding-left:20px"><img src="/feature/images/fsc.jpg" alt="Walsworth going green!" name="sideImg" border=0 id="sideImg2" title="Walsworth going green!" /><br/><a href="/feature/images/fsc.shtml" style="float:right">MORE</a>';

features[2] = '<strong>Jim Fetherston joins Walsworth as Vice President of Commercial Sales</strong><br>&nbsp;<a href="/feature/images/fetherston.shtml" style="padding-left:20px"><img src="feature/images/jimfetherston.jpg" alt="Jim Fetherston joins Walsworth as Vice President of Commercial Sales" name="sideImg" border=0 id="sideImg2" title="Jim Fetherston joins Walsworth as Vice President of Commercial Sales" /><br/><a href="/feature/images/fetherston.shtml" style="float:right">MORE</a>';

features[3] = '<strong>Walsworth Publishing Company Celebrates 70</strong><br>&nbsp;<a href="/feature/images/70_wpc.shtml" style="padding-left:20px"><img src="feature/images/70_wpc_small.jpg" alt="Walsworth Celebrates Seventy Years" name="sideImg" border=0 id="sideImg2" title="Walsworth Celebrates Seventy Years" /><br/><a href="/feature/images/70_wpc.shtml" style="float:right">MORE</a>';

features[4] = '<strong>Walsworth Publishing Company installs it\'s second 4-color Heidelberg Press.</strong><br>&nbsp;<a href="/feature/images/twoheidelberg.shtml" style="padding-left:20px"><img src="feature/images/2_heidelburgs_small.jpg" alt="Two Heidelbergs" name="sideImg" border=0 id="sideImg2" title="Two Heidelbergs" /><br/><a href="/feature/images/twoheidelberg.shtml" style="float:right">MORE</a>';

/*features[4] = '<strong>Walsworth Publishing Company wins Silver Award in 20th Annual Gold Ink Awards Competition</strong><a href="/feature/feature.shtml" style="padding-left:20px"><br>&nbsp;<img src="feature/images/home_feature_silveraward.gif" alt="Gold Ink Award" name="sideImg" border=0 id="sideImg2" title="Gold Ink Award" /><br/><a href="/feature/feature.shtml" style="float:right">MORE</a>';

features[5] = '<strong>Walsworth Publishing Company installs new press!</strong><a href="/feature/images/new_press_heidelberg.shtml" style="padding-left:20px"><br>&nbsp;<img src="feature/images/Heidelberg2.jpg" alt="New Press" name="sideImg" border=0 id="sideImg2" title="New Press" /><br/><a href="/feature/images/new_press_heidelberg.shtml" style="float:right">MORE</a>';*/

	
	var ckie = getCookie('functioncookie');
	if(!ckie)
	{
		setfunctioncookie('functioncookie', '0');
		var ckie = getCookie('functioncookie');
	}
	
	for (i=0; i < features.length; i++)
	{
		if(ckie==[i])
		
		{
			//var content= '<strong>Walsworth Publishing Company wins Silver Award in 20th Annual Gold Ink Awards Competition</strong><div></div>';
		 	document.getElementById('features').innerHTML = features[i];
			

			if(i == 4)
				{
					var j = [0];
				}
			else
				{
					var j = i + 1;
				}
			setfunctioncookie('functioncookie', j);
		}
	}
	
}
	











