/*

	Filename:          script.js
	Description:       Javascript functions
	Client:            Michael Michalak, Distressed Property Expert
	Author:            Steven Dahlman, DCM Software
	Start date:        07-19-11
	Last modification: 09-05-11

*/

//
// Function:    contactform
// Description: Display contact form
//
// Return code:
//  0 = Success
//
function contactform () {

	document.write('<P><FORM name="contact" action="http://www.dcmsoft.com/cgi-bin/FormMail.pl" method="post">');

	document.write('<INPUT type="hidden" name="recipient" value="mikesellschicago@gmail.com" />');
	document.write('<INPUT type="hidden" name="subject" value="Message from mikehelpschicago.com visitor" />');
	document.write('<INPUT type="hidden" name="redirect" value="http://www.mikehelpschicago.com/econfirm.htm" />');
	document.write('<INPUT type="hidden" name="required" value="realname,email" />');

	document.write('<TABLE border=0 cellpadding=0 cellspacing=8 bgcolor="#f0f0f0" class="medium1">');

	document.write('<TR><TD>Name:</TD><TD><INPUT type="text" name="realname" size=50 maxlength=50 /></TD></TR>');
	document.write('<TR><TD>Email address:</TD><TD><INPUT type="text" name="email" size=50 maxlength=50 /></TD></TR>');
	document.write('<TR><TD>Telephone:</TD><TD><INPUT type="text" name="telephone" size=12 maxlength=14 /></TD></TR>');
	document.write('<TR><TD valign="top">Message:</TD><TD><TEXTAREA name="comments" cols=50 rows=5></TEXTAREA></TD></TR>');

	document.write('<TR><TD colspan=2 align="center"><INPUT type="submit" value="SEND" class="button1" /></TD></TR>');

	document.write('</TABLE>');

	document.write('</FORM></P>');

	return(0);

}

//
// Function:    disclaimer
// Description: Display disclaimer
//
// Return code:
//  0 = Success
//
function disclaimer () {

	document.write('<P><TABLE width="100%" border=0 cellpadding=16 cellspacing=0 class="disclaimer"><TR><TD>');

	document.write('<P>The above brokerage assumes no responsibility nor guarantees the accuracy of this information and is not engaged in the practice of law nor gives legal advice. It is strongly recommended that you seek appropriate professional counsel regarding your rights as a homeowner. The above brokerage is not associated with the government, and our service is not approved by the government or your lender. Even if you accept this offer and use our service, your lender may not agree to change your loan. Each RE/MAX office is independently owned and operated.</P>');

	document.write('<P><A class="astyle1" href="http://www.cdpe.com/">&copy; 2011 Distressed Property Institute, LLC.</A> All Rights Reserved </P>');

	document.write('</TD></TR></TABLE></P>');

	return(0);

}

//
// Function:    header
// Description: Display page header
//
// Return code:
//  0 = Success
//
function header () {

	document.write('<TABLE width="100%" border=0 cellpadding=0 cellspacing=8><TR>');

	document.write('<TD class="logo" valign="top" align="right"><IMG src="image/michael_michalak.jpg" width=116 height=175 border=1 alt="Michael Michalak"></IMG></TD>');

	document.write('<TD valign="top"><SPAN class="pagetitle2">Michael Michalak<BR />Distressed Property Expert<BR /></SPAN><SPAN class="slogan">Helping Chicago Homeowners</SPAN></TD>');

	document.write('<TD id="headercontact" valign="top"><SPAN class="agentphone">Phone:</SPAN> 312.527.4417</TD>');

	document.write('</TR></TABLE>');

	return(0);

}

//
// Function:  mainmenu
// Descripoti Display main menu
//
// Input:
// [argument 1] = Current page (0=Home)
//
// Return code:
//  0 = Success
//
function mainmenu (cpage) {

	var page = new Array ( "index.html", "foreclosure.htm", "short_sales.htm", "resources.htm", "faq.htm", "contact.htm" );
	var title = new Array ( "Home", "Foreclosure Solutions", "Short Sales Explained", "Resources", "FAQ", "Contact Us" );
	var index = 0;

	document.write('<P><TABLE width="100%" border=0 cellpadding=0 cellspacing=8><TR><TD align="center"><DIV id="mainmenu-nav"><UL>');

	for ( index = 0; index < page.length; index ++ ) {

		if ( cpage == index ) {
			document.write('<LI><A class="current" href="' + page[index] + '"><SPAN>' + title[index] + '</SPAN></A></LI>');
		} else if ( index == 3 ) {
			// Skip "RESOURCES"
		} else {
			document.write('<LI><A href="' + page[index] + '"><SPAN>' + title[index] + '</SPAN></A></LI>');
		}

	}

	document.write('</UL></DIV></TD></TR></TABLE></P>');

	return(0);

}

//
// Function:    rightcolumn
// Description: Display right column
//
// Return code:
//  0 = Success
//
function rightcolumn () {

	document.write('<TD width=200 valign="top" align="center">');

	document.write('<P><A href="end_rope.htm"><IMG src="image/homeowners1.jpg" width=200 height=141 border=1></IMG></A></P>');

	document.write('<P><A href="free_report.htm"><IMG src="image/qualifications1.jpg" width=200 height=141 border=1></IMG></A></P>');

	document.write('<DIV id="rsblock-header3"><A href="what_cdpe.htm">What is a CDPE?</A></DIV>');

	document.write('<DIV id="rsblock-cdpe">Learn how agents with the <A href="what_cdpe.htm">Certified Distressed Property Expert designation</A> are best suited to help distressed homeowners.</DIV>');

	document.write('<DIV id="rsblock-header4"><A href="contact.htm">Contact This CDPE</A></DIV>');

	document.write('<DIV id="rsblock-contact"><A href="contact.htm">Michael Michalak</A><BR />RE/MAX Signature<BR />2901 North Clybourn<BR />Chicago, IL 60618<BR />312.527.4417</DIV>');

	document.write('<DIV class="ehoLogo2"><IMG src="image/eho_logo1.jpg" width=50 height=53 border=0 alt="Equal Housing Opportunity"></DIV>');

	document.write('</TD>');

	return(0);

}
