
	function validate(sval,dval) {


	    if (dval=="No") {
		    //alert("You must be 21 years of age or older before entering the Silver Eagle Distributors, Inc. website.\n\n Thank you.")
		    document.getElementById("msg").innerHTML = "<img src='http://www.wideworldofbud.com/sedlanding/images/age-sorynot21.png'>"
			return false;
		} else {
			//return true;


    location.href = "http://www.craftbrews.com/setsession.asp"
			try {
			    document.getElementById("setsession").src="http://www.craftbrews.com/setsession.asp"
			    setSessionAjax("http://www.wideworldofbud.com/setsession.asp")	
			} catch(e) {
			
			
			}

			try {
          
			    document.getElementById("setsessioncraft").src="http://www.wideworldofbud.com/setsession.asp"
			    setSessionAjax("http://www.craftbrews.com/setsession.asp")
			    
			} catch(e) {
			
			
			}
			
			try {
			    document.getElementById("setsessionsed1").src="http://www.wideworldofbud.com/setsession.asp"
			    document.getElementById("setsessionsed2").src="http://www.craftbrews.com/setsession.asp"
			    setSessionAjax("http://www.silvereagle.com/setsession.asp")		
			} catch(e) {
			
			
			}
			
			//setSessionAjax("http://www.craftbrews.com/setsession.asp")


			//location.href = "http://www.wideworldofbud.com/default.asp?id=2&ss=true"

			WindowClose2();

			//if (sval == "craftbrews.com") {

			//    setTimeout("stopfunc()", 1000)

			//}
                

			return false;
		}
}


function stopfunc() {

    //location.href = 'summerflash.asp'
}

function IsValidDayInMonth( TheMonth, TheDay ){
        DaysInAMonth = new Array();
        DaysInAMonth[0] = 31;
        DaysInAMonth[1] = 29;
        DaysInAMonth[2] = 31;
        DaysInAMonth[3] = 30;
        DaysInAMonth[4] = 31;
        DaysInAMonth[5] = 30;
        DaysInAMonth[6] = 31;
        DaysInAMonth[7] = 31;
        DaysInAMonth[8] = 30;
        DaysInAMonth[9] = 31;
        DaysInAMonth[10] = 30;
        DaysInAMonth[11] = 31;
        
        if ( !OnlyNumbers( TheDay ) ){
                return false;
        }
        
        if ((parseInt( TheDay ) > DaysInAMonth[ parseInt( TheMonth ) ]) || 
                (parseInt( TheDay ) < 1)){
                        return false;
        }
        
        return true;
}


function OnlyNumbers( stringy )
{
        if(stringy.length==0) return (false);
        var RefString="1234567890";
        for (Count=0; Count < stringy.length; Count++)  {
                TempChar= stringy.substring (Count, Count+1);
                if (RefString.indexOf (TempChar, 0)==-1)  
                        return (false);
        }
        return (true);
}

function GetCookie(name) {
    var start = document.cookie.indexOf(name+"=");
    var len = start+name.length+1;
    if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
    if (start == -1) return null;
    var end = document.cookie.indexOf(";",len);
    if (end == -1) end = document.cookie.length;
    return unescape(document.cookie.substring(len,end));
}

function SetCookie(pName, pValue, pExpires, pPath, pDomain, pSecure) {
//   var today = new Date();
//   var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000);

   var sCurrentValue = GetCookie(name);

   if(sCurrentValue != pValue) {
      document.cookie = pName + "=" + escape(pValue) +
      ((pExpires)  ? ";expires=" + pExpires.toGMTString() : "") +
      ((pPath)     ? ";path=" + pPath : "") + 
      ((pDomain)   ? ";domain=" + pDomain : "") +
      ((pSecure)   ? ";secure" : "");
   }
}

var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)    
year = year + 1900; 
	
