// JavaScript Document

function setCookie(c_name,value,expiredays)
{var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
} 


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 newsletterCheck(){

signedup = getCookie("RenoNewsletterSignUp");
var currentURL = location.href;

document.write("<table width='160' border='0' cellpadding='6' cellspacing='2' bgcolor='#FFFFFF'>");

  if (signedup != null && signedup == "Yes"){
	document.write("<tr><td background='../images/bg_news_blue_thanks.jpg' bgcolor='#deccb4' width='160' height='200'>&nbsp;</td></tr>");
  }else{
	document.write("<form name='signup' method='post' action='/Contact/contracting_signup_process.asp' onSubmit='return validateSignUpFormOnSubmit(this);'>");
	document.write("<tr bgcolor='#7fafd6'>");
	document.write("<td class='enews'><p align='left' class='text-med style6 style11'><br><br><br><br></p>");
	document.write("<p><span class='text-med style11'><strong>Name:</strong></span><br>");	
	document.write("<input name='signup_name' class='news' type='text' id='signup_name' size='21'></p>");
	document.write("<p><span class='text-med style11'><strong>E-mail:</strong></span><br>");
	document.write("<input name='signup_email' class='news' type='text' id='signup_email' size='21'></p>");		  
	document.write("<p><input type='submit' class='news' name='button' id='button' value='Sign up'></p>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<input type='hidden' name='signup_returnto' value='" + currentURL + "'");
	document.write("</form>");
  }
  
  document.write("</table>");

}
