// JavaScript Document
function addOmniture(pagename,events,prop2,prop3){
  var url = 'includes/session/omniture.jsp';
  var pars = 'pagename=' + pagename + '&events=' + events + '&prop2=' + prop2 + '&prop3=' + prop3;
  top.frames['omnitureFrame'].location = url + '?' + pars; return true; 
}

function getVideoDemo(video,shdw,videoType) {
  var vidURL = '"' + contextPath + '/includes/autodemo.jsp?omniKey=' + omniKey + '"';
  var divWidth = "965";
  var divHeight = "619";
  addOmniture('autodemo|regaffil','','autodemo|regaffil','autodemo|regaffil' + omniKey);
	
	var divVideo = document.getElementById(video);
	var divShdw = document.getElementById(shdw);
	divVideo.style.visibility = "visible";
	divShdw.style.visibility = "visible";
	var newDiv = document.createElement('div');
	newDiv.id = 'vidFlash';
	newDiv.innerHTML = '<iframe id="vidFrame" src=' + vidURL + 'width="' + divWidth + '" height="' + divHeight + '" scrolling="no" frameborder="0"></iframe>';
	divVideo.appendChild(newDiv);
}

function closeVideo(video,shdw) {
	var divVideo = document.getElementById(video);
	var divShdw = document.getElementById(shdw);
	var newDiv = document.getElementById('vidFlash');
	divVideo.style.visibility = "hidden";
	divShdw.style.visibility = "hidden";
	divVideo.removeChild(newDiv);
}

function buttonHover(source, obj)
{
obj.src = source;
return true;
}

//Get Today's Date
function getMonthName() {
	var myDate = new Date();
	var month=new Array(12)
	month[0]="January"
	month[1]="February"
	month[2]="March"
	month[3]="April"
	month[4]="May"
	month[5]="June"
	month[6]="July"
	month[7]="August"
	month[8]="September"
	month[9]="October"
	month[10]="November"
	month[11]="December"
	var thisMonth = month[myDate.getMonth()];
	return thisMonth;
}
function getWeekday() {
	var d=new Date();

	var weekday=new Array(7);
	weekday[0]="Sunday";
	weekday[1]="Monday";
	weekday[2]="Tuesday";
	weekday[3]="Wednesday";
	weekday[4]="Thursday";
	weekday[5]="Friday";
	weekday[6]="Saturday";
	
	return weekday[d.getDay()];	
}
function todayDate() {
	var myDate = new Date();
	month = getMonthName();
	var today = getWeekday();
	var day = myDate.getDate();
	var year = myDate.getFullYear();
	var thisDay = today+", "+month+" "+day+", "+year;	
	return thisDay;
}
