function GetMonth(nMonth)
{
	var Months = new Array("Jan.","Feb.","Mar.","April","May","June",
	                       "July","Aug.","Sep.","Oct.","Nov.","Dec.");
	return Months[nMonth] 	  	 
}

function DateString()
{
	var Today = new Date();
	
	Today.setDate(Today.getDate() + 1);
	 /*Today.setDate(31);*/   /* For christmas*/ 
	
	var strDate="(<span style='font-size:10px; color:#ff0000'>Special Offer expires on " + GetMonth(Today.getMonth())+" " + Today.getDate() + "</span>)\n"; 
	/*var strDate=""+"Holiday Season Offer";*/
  	return strDate
}
var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")

function getDate()
{ 
  var Today = new Date();
  return weekday[Today.getDay()];
}

 var text=new Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
                    "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
					"0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
 var length=text.length;
 var codeLength=11;
 var randomCode='';

rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
};

function rand(number) {
        return Math.ceil(rnd()*number);
};
function generateCode()
{
     for(var i=0; i<codeLength; i++)
	    randomCode+=text[rand(36)-1];
}
//generateCode();
function updateLink(itemId)
{
	 var linkName='link'+itemId;
	 var checkName='check'+itemId;
   var link=document.getElementById(linkName);
   var ch=document.getElementById(checkName);   
   
   var hf="https://www.regnow.com/softsell/nph-softsell.cgi?ss_short_order=true&items=15184-"; 
   if(ch.checked){
   	link.href=hf+itemId+",15184-3&ss_cart_reset=true";
   }
  else
  	link.href= hf+itemId+"&ss_cart_reset=true";     
}

/* pop-up window */

function openwin(picture) 
{ window.open (picture, "Screenshots", "height=550, width=550, top=0, left=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
}
