function WriteSeminarHeader() {

document.write("<TABLE  align=\"center\">");
document.write("<TR><TD height=\"100%\" class=\"inormal\" style=\"color:#333333\"><BR><table><tr>	<td valign=\"top\" >");			
document.write("<TABLE style=\"border: 1pt solid #666666\" bgcolor=\"#EFEFEF\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"  align=\"center\">");
document.write("<TR align=\"left\" bgcolor=\"#357e86\">");
document.write("<TD style=\"border-bottom:1pt solid #666666; height: 44px;\">");
document.write("<TABLE cellpadding=\"3\" cellspacing=\"0\" >");
document.write("<TR><TD class=\"bg\" style=\"text-align: center\">");	
document.write("<FONT class=\"inormal2\" style=\"color:#FFFFFF\"><b style=\"text-align: center\">Upcoming Full Day Seminar Dates</b></FONT></TD>");
document.write("</TR></TABLE></TD></TR>");
document.write("<TR><TD><TABLE cellpadding=\"3\" cellspacing=\"0\" ><TR>");
document.write("<TD valign=\"top\" width=\"100%\">");
document.write("<TABLE class=\"inormal\" cellpadding=\"3\" cellspacing=\"0\" border=0 >");							    
document.write("<TR bgcolor=\"#357e86\">");
document.write("<TD valign=\"top\" style=\"width: 100px; height: 22px;\"><FONT style=\"color:#FFFFFF\"><b>Date </b></FONT></TD>");
document.write("<TD valign=\"top\" style=\"width: 170px; height: 22px;\"><FONT style=\"color:#FFFFFF\"><b>Specialty </b></FONT></TD>");
document.write("<td valign=\"top\" style=\"width: 150px; height: 22px;\">");
document.write("<FONT style=\"color:#FFFFFF\"><b>City </b></FONT></td>");
document.write("<td valign=\"top\" style=\"width: 75px; height: 22px;\"></td></TR>");

/*document.write("<table>");*/
}

function WriteSeminarFooter() {
    document.write("</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR></td></tr></table></TD></TR></TABLE>");
 /*   document.write("</table>");*/
}

function WriteHeader() {
	document.write("<!standard 3d table footer>");
	document.write("<table style=\"border-left: 1 solid #000000;border-right: 1 solid #D0D5DF;border-top: 1 solid #000000; border-bottom: 1 solid #D0D5DF\" bgcolor=white width=140 cellpadding=\"2\" cellspacing=\"0\">");
	document.write("<tr><td><center><b>Coding Seminars</b></center></td></tr>");	

    document.write("<tr><td><marquee behavior=\"scroll\" direction=\"up\" width=\"140\" height=\"160\" scrollamount=1 scrolldelay=60 onmouseover=\"this.stop()\" onmouseout=\"this.start()\"><table border=0 cellpadding=0 cellspacing=0 width=\"128\" bgcolor=\"white\">");	
}

function WriteFooter() {
    document.write("</table></marquee></td></tr></table>");
}
function WriteTest() {
    document.write("Hello");
}

//function DisplaySeminar(SeminarDate, PrintDate, Specialty, City, Pdf, Price) {
function DisplaySeminar(SeminarDate, VAR_PRINTDATE, VAR_SPECIALTY, VAR_CITY, VAR_PRICE, VAR_BGCOLOR) {

    var PrintSpecialty = "";
    var PrintCity = "";
    
    
	if(VAR_SPECIALTY == "peds") {
		PrintSpecialty = "Pediatrics";
	}
	else if(VAR_SPECIALTY == "obgyn") {
		PrintSpecialty = "OB/Gyn";
	}	
	else if(VAR_SPECIALTY == "ortho") {
		PrintSpecialty = "Orthopedics";
	}
   	else if(VAR_SPECIALTY == "pc") {
		PrintSpecialty = "Primary Care";
	} 
	else if(VAR_SPECIALTY == "surg") {
		PrintSpecialty = "General Surgery";
	}
	else if(VAR_SPECIALTY == "opt") {
		PrintSpecialty = "Ophthalmology ";
	}
	else if(VAR_SPECIALTY == "pul") {
		PrintSpecialty = "Pulmonary";
	}
	else if(VAR_SPECIALTY == "rad") {
		PrintSpecialty = "Radiology";
	}

	if(VAR_CITY== "Springfield") {
	    PrintCity = "Spingfield, MA";
	}
	else if(VAR_CITY == "NewHaven") {
	    PrintCity = "New Haven, CT"
	}
	else if(VAR_CITY == "PalmBeach") {
	    PrintCity = "Palm Beach"
	}
	else if(VAR_CITY== "Oklahoma") {
	    PrintCity = "Oklahoma City"
	}
	else if(VAR_CITY == "LosAngeles") {
	    PrintCity = "Los Angeles"
	}
	else if(VAR_CITY == "FtLauderdale") {
	    PrintCity = "Fort Lauderdale"
	}				
	else {
	    PrintCity = VAR_CITY;
	}
	
    var today = new Date();


    var maxDate=new Date();
    maxDate.setDate(maxDate.getDate()+90);
    var display = "";  
    if(today < SeminarDate && SeminarDate < maxDate) {
	var aTR1 ="<TR bgcolor=\"";
	display = display + aTR1;
	display = display + VAR_BGCOLOR;    
    display = display +  "\"><td  height: 22px\" valign=\"top\"><font style=\"color: #333333\"><b>";
    display = display + VAR_PRINTDATE;
    display = display + "</b></font></td><td  valign=\"top\"><font style=\"color: #333333\">";
    display = display + PrintSpecialty;
    display = display + "</font></td><td  valign=\"top\"> <a href=\"http://www.ksamcc.com/seminar.php?city=";
	display = display + VAR_CITY;
	display = display + "&date=";
	display = display + VAR_PRINTDATE;
	display = display + "&specialty=";
	display = display + VAR_SPECIALTY;
	display = display + "&price=";
	display = display + VAR_PRICE; 
	display = display + "\"> ";
    display = display + PrintCity;
    display = display + "</a></td><td valign=\"top\"><form action=\"http://www.ksamcc.com/seminar.php\" method=\"get\"><input name=\"city\" type=\"hidden\" value=\"";
    display = display + VAR_CITY;
    display = display + "\" /><input name=\"date\" type=\"hidden\" value=\"";
    display = display + VAR_PRINTDATE;
    display = display + "\" /><input name=\"specialty\" type=\"hidden\" value=\"";
    display = display + VAR_SPECIALTY;
    display = display + "\" /><input type=\"submit\" value=\"Register\" /></form></td></tr>";
    document.write(display);
        
    	
    }
}



var seminarDate = new Date();
var aLight = "#EFEFEF";
var aDark = "#BBCEEF";

WriteSeminarHeader();    	


    seminarDate.setFullYear(2009,8,14);
	DisplaySeminar(seminarDate, "9/14/2009", "peds", "FtLauderdale", "$255", aLight);

    seminarDate.setFullYear(2009,8,15);
	DisplaySeminar(seminarDate, "9/15/2009", "peds", "Atlanta",  "$255", aDark);

    seminarDate.setFullYear(2009,8,16);
	DisplaySeminar(seminarDate, "9/16/2009", "obgyn", "Atlanta",  "$255", aLight);


    seminarDate.setFullYear(2009,8,17);
 	DisplaySeminar(seminarDate, "9/17/2009", "ortho", "Atlanta",  "$255", aDark);


    seminarDate.setFullYear(2009,8,21);
	DisplaySeminar(seminarDate, "9/21/2009", "obgyn", "FtLauderdale",  "$255", aLight);
	
    seminarDate.setFullYear(2009,8,22);
	DisplaySeminar(seminarDate, "9/22/2009", "peds", "Houston",  "$255", aDark);

    seminarDate.setFullYear(2009,8,22);
	DisplaySeminar(seminarDate, "9/22/2009", "peds", "Cleveland",  "$255", aLight);

    seminarDate.setFullYear(2009,8,23);
	DisplaySeminar(seminarDate, "9/23/2009", "obgyn", "Houston",  "$255", aDark);
	
    seminarDate.setFullYear(2009,8,24);
 	DisplaySeminar(seminarDate, "9/24/2009", "ortho", "Houston",  "$255", aLight);
	
    seminarDate.setFullYear(2009,8,28);
	DisplaySeminar(seminarDate, "9/28/2009", "peds", "Springfield",  "$255", aDark);
	
    seminarDate.setFullYear(2009,9,2);
	DisplaySeminar(seminarDate, "10/2/2009", "peds", "Hartford",  "$255", aLight);	
	
    seminarDate.setFullYear(2009,9,5);
 	DisplaySeminar(seminarDate, "10/5/2009", "ortho", "FtLauderdale",  "$255", aDark);

    seminarDate.setFullYear(2009,9,6);
	DisplaySeminar(seminarDate, "10/6/2009", "peds", "Phoenix",  "$255", aLight);

    seminarDate.setFullYear(2009,9,7);
	DisplaySeminar(seminarDate, "10/7/2009", "obgyn", "Phoenix",  "$255", aDark);

    seminarDate.setFullYear(2009,9,8);
 	DisplaySeminar(seminarDate, "10/8/2009", "ortho", "Phoenix",  "$255", aLight);
 	
    seminarDate.setFullYear(2009,9,16);
	DisplaySeminar(seminarDate, "10/16/2009", "obgyn", "Hartford",  "$255", aDark); 	

    seminarDate.setFullYear(2009,9,20);
 	DisplaySeminar(seminarDate, "10/20/2009", "ortho", "Hartford",  "$255", aLight);

     seminarDate.setFullYear(2009,9,20);
	DisplaySeminar(seminarDate, "10/20/2009", "obgyn", "Cleveland",  "$255", aDark); 
 	
     seminarDate.setFullYear(2009,9,22);
	DisplaySeminar(seminarDate, "10/22/2009", "obgyn", "Springfield",  "$255", aLight); 
	
    seminarDate.setFullYear(2009,9,27);
	DisplaySeminar(seminarDate, "10/27/2009", "peds", "Dallas",  "$255", aDark);

    seminarDate.setFullYear(2009,9,28);
	DisplaySeminar(seminarDate, "10/28/2009", "obgyn", "Dallas",  "$255", aLight);

    seminarDate.setFullYear(2009,9,29);
 	DisplaySeminar(seminarDate, "10/29/2009", "ortho", "Dallas",  "$255", aDark);	
 	
    seminarDate.setFullYear(2009,10,3);
 	DisplaySeminar(seminarDate, "11/3/2009", "ortho", "Springfield",  "$255", aLight); 	
		
    seminarDate.setFullYear(2009,10,10);
	DisplaySeminar(seminarDate, "11/10/2009", "peds", "Boston",  "$255", aDark);

    seminarDate.setFullYear(2009,10,10);
 	DisplaySeminar(seminarDate, "11/10/2009", "ortho", "Cleveland",  "$255", aLight); 	

    seminarDate.setFullYear(2009,10,12);
	DisplaySeminar(seminarDate, "11/12/2009", "obgyn", "Boston",  "$255", aDark);
				
    seminarDate.setFullYear(2009,10,17);
	DisplaySeminar(seminarDate, "11/17/2009", "peds", "San Francsico",  "$255", aLight);

    seminarDate.setFullYear(2009,10,18);
	DisplaySeminar(seminarDate, "11/18/2009", "obgyn", "San Francsico",  "$255", aDark);

    seminarDate.setFullYear(2009,10,19);
 	DisplaySeminar(seminarDate, "11/19/2009", "ortho", "San Francsico",  "$255", aLight);

    seminarDate.setFullYear(2009,11,2);
 	DisplaySeminar(seminarDate, "12/2/2009", "ortho", "Boston",  "$255", aDark);

    seminarDate.setFullYear(2009,11,8);
	DisplaySeminar(seminarDate, "12/8/2009", "peds", "Orlando",  "$255", aLight);

    seminarDate.setFullYear(2009,11,9);
	DisplaySeminar(seminarDate, "12/9/2009", "obgyn", "Orlando",  "$255", aDark);

    seminarDate.setFullYear(2009,11,10);
 	DisplaySeminar(seminarDate, "12/10/2009", "ortho", "Orlando",  "$255", aLight);

 WriteSeminarFooter();

    