

function theDay(id){
var weekday=new Array(7);
weekday[1]="Sunday";
weekday[2]="Monday";
weekday[3]="Tuesday";
weekday[4]="Wednesday";
weekday[5]="Thursday";
weekday[6]="Friday";
weekday[7]="Saturday";

var presentMonth = new Array(12);

presentMonth[1]="January";
presentMonth[2]="February"
presentMonth[3]="March"
presentMonth[4]="April"
presentMonth[5]="May"
presentMonth[6]="June"
presentMonth[7]="July"
presentMonth[8]="August"
presentMonth[9]="September"
presentMonth[10]="October"
presentMonth[11]="November"
presentMonth[12]="December"
var d = new Date();
var z = (d.getMonth() + 1);

var theNow = presentMonth[z] + " " + d.getDate() + ", " + d.getFullYear(); 



var y = (d.getDay() + 1);




var x = document.getElementById("dinput");
x.innerHTML=(weekday[y] +", " + theNow);

}
//Use the onload property of the window object to call a function literal the calls the theDay() function

	/*Access the xhtml element without mixing javascript and xhtml 
document.getElementById("dinput").onclick = function(evt){
	*/
	//<p id="dinput">Today's Date</p> 
	
	
	//----------------------Dynamic link function-----------------------------------------------------------//
	//demo for next code document.getElementById("someElem" + i);
		
			
					
			function disclosureLink(){
			
			dynaLink = document.getElementById("dinput");
			var elem = document.createElement("a");
				elem.setAttribute("href","index.html");
				//elem.setAttribute("target","blank");
			var txt = document.createTextNode(" We apologize, our site is undergoing maintenance at this time, some of the product pages are not available. We are working to update them as soon as possible.Thank you for your patiences.");   
			
						  //style the link//
						 dynaLink.style.fontWeight = "bold";
						 dynaLink.style.fontSize = "12pt";
						 dynaLink.style.backgroundColor= "#F08080";
						 //dynaLink.style.textAlign = "center";
						
						  //append elements and attributes to the document//
						 elem.appendChild(txt);
						 dynaLink.appendChild(elem);
					}
				
	
	
	
	
	
	
	
	
	