var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;
function hidelayer(lay) {
if (ie4) {document.all[lay].style.visibility = "hidden";}
if (ns4) {document.layers[lay].visibility = "hide";}
if (ns6) {document.getElementById([lay]).style.display = "none";}
}
function showlayer(lay) {
if (ie4) {document.all[lay].style.visibility = "visible";}
if (ns4) {document.layers[lay].visibility = "show";}
if (ns6) {document.getElementById([lay]).style.display = "block";}
}
function SetStatus(index)
{
    if (index > 0)
    {
	switch (index)
	{
	    case 1:
		window.status = "Return to the homepage";
	    break;
	    case 2:
		window.status = "Read Steven's Biography";
	    break;
	    case 3:
		window.status = "Sign our Guestbook";
	    break;
	    case 4:
		window.status = "Listen to sample music";
	    break;
	    case 5:
		window.status = "Frequently Asked Questions Page";
	    break;
	    case 6:
		window.status = "Modern Day Mozart Music Store";
	    break;
	    case 7:
		window.status = "Contact Us Page";
	    break;
	}
    }
    else
    {
	window.status = "";
    }
}
function showpic(src, w, h, alt, aln, pw, ph, bw, bh) {
if (src == null) return;
var iw, ih; // Set inner width and height
if (window.innerWidth == null) {
iw = document.body.clientWidth;
ih=document.body.clientHeight;
}
else {
iw = window.innerWidth;
ih = window.innerHeight;
}
if (w == null) w = iw;
if(h == null)  h = ih;
if(alt == null) alt = "Picture";
if(aln == null) aln = "left";
if(pw == null) pw = 100;
if(ph == null) ph = 100;
if(bw == null) bw = 0//24;
if(bh == null) bh = 0//24;
var sw = Math.round((iw - bw) * pw / 100);
var sh = Math.round((ih - bh) * ph / 100);
if ((w * sh) / (h * sw) < 1) sw = Math.round(w * sh / h);
else sh = Math.round(h * sw / w);
document.write('<img src="'+src+'" alt="'+alt+'" width="'+sw+'" height="'+sh+'" align="'+aln+'">');
}
function DrawCalender()
{
var today = new Date();
var month = today.getMonth();
var year = today.getYear();
var Months = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var week = new Array("S", "M", "T", "W", "T", "F", "S");
var monthdays = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var day = today.getDay();
var dayN = today.getDate();
var days = monthdays[month];
if (year < 2000)
{
   year += 1900;
}
if (month == 1) {
  if (year%4 == 0) days = 29;
}
document.write("<FONT FACE='VERDANA' SIZE='2'>" + Months[month] + " " + year + "</FONT><BR>");
document.write("<table border='0' cellspacing='0' cellpadding='0'>");
document.write("<tr>");
for (var i=0; i<7; i++) {
  document.write("<td width='23' height='23'>");
  document.write("<div align='center'><FONT FACE='VERDANA' SIZE='2'><B>" + week[i] + "</B></FONT></div>");
  document.write("</td>");
}
document.write("</tr>");
var jumped = 0;
var inserted = 1;
var start = day - dayN%7 + 1;
if (start < 0) start += 7;
var weeks = parseInt((start + days)/7);
if ((start + days)%7 != 0) weeks++;
for (var i=weeks; i>0; i--) {
  document.write("<tr>");
  for (var j=7; j>0; j--) {
    document.write("<td>");
    if (jumped<start || inserted>days) {
      document.write("<div align='center'></div>");
      jumped++;
    }
    else {
	var link = "http://www.moderndaymozart.com/Calender.php?type=day&year=" + year + "&month=" + eval(month+1) + "&day=" + inserted;
        if (inserted == dayN)
        {
		document.write("<div align='center'><FONT FACE='VERDANA' SIZE='2'>" + "[" + "<A HREF='" + link + "' STYLE='color : blue; font-size : 10pt;'>" + inserted + "</A>" + "]" + "</FONT></div>");
        }
	else if (inserted > dayN)
        {
		document.write("<div align='center'><FONT FACE='VERDANA' SIZE='2'><A HREF='" + link + "' STYLE='color : blue; font-size : 10pt;'>" + inserted + "</A></FONT></div>");
        }
        else document.write("<div align='center'><FONT FACE='VERDANA' SIZE='2'>" + inserted + "</FONT></div>");
      inserted++;
    }
    document.write("</td>")
  }
  document.write("</tr>");
}
document.write("</table>");
}