/**
 * @author Valentin
 */
//training.js
	var maulin = Class.create();
	maulin.prototype = {
	initialize: function()
	{
		//$('pageshow').innerHTML = 'sssss';
	},
	home:function(){
		$('pageshow').innerHTML = '<div id="pageinfo">'+
				  '<div align="center"><img src="images/welcome.gif" alt="Welcome to Huber &amp; Associates" width="370" height="30" /></div>'+
	      'The huber and Associates organization is comprised of a team of  industry professionals dedicated to excellence in any custom or  otherwise challenging roofing project. the firm was founded by barry R.  Huber who has 33 years in the construction trade and holds 3 patents in  the roofing industry.<br />'+
                  '<br />'+
			      'Briefly, We specialize primarily in the sloped roofing field, yet able  to perform low slope or flat roof aspects if the project requires. our  work is typically in the custom residential or commercial market and  would commonly employ time tested durable products such as slate, tile,  copper and special wood applications.'+
			      '<br />'+
			      '<br />'+
			      'Please Contact Us'+
				  '  <ul>'+
                   ' <li>Roof designs, whether aesthetic or mechanical</li>'+
				   ' <li>New ideas/innovation</li>'+
				   ' <li>Custom and otherwise challenging or specialized roofing</li>'+
				   ' <li><em>A blend of Various roof configurations</em></li>'+
			      '</ul>'+
			      '</div>';		
	},
	portofolio:function()
	{
		$('pageshow').innerHTML = '<table id="Table_01" width="100%" height="300" border="0" cellpadding="0" cellspacing="0">'+
                  '<tr>'+
                   ' <td><a href="tile_portfolio.html"><img src="images/portlinks_01.jpg" alt="TILE" width="133" height="300" border="0" /></a></td>'+
                   ' <td><a href="metal_portfolio.html"><img src="images/portlinks_02.jpg" alt="METAL" width="134" height="300" border="0" /></a></td>'+
                   '<td><a href="wood_portfolio.html"><img src="images/portlinks_03.jpg" alt="WOOD" width="136" height="300" border="0" /></a></td>'+
                   '<td><a href="thatch_portfolio.html"><img src="images/portlinks_04.jpg" alt="THATCH" width="134" height="300" border="0" /></a></td>'+
                   ' <td><a href="slate_portfolio.html"><img src="images/portlinks_05.jpg" alt="SLATE" width="133" height="300" border="0" /></a></td>'+
                  '</tr>'+
                '</table>';	
	},
	inquiry:function(){
		$('pageshow').innerHTML = '<div id="inquiryfrm">'+
				  '<h1><em>For more information, Please fill out the from below:</em></h1>'+
				  '<div id="messok"></div>'+
				  '<form id="inquiryform" name="inquiryform"  method="post" onsubmit="return maus.send_form(this);">'+
				    '<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
                      '<tr valign="top">'+
                        '<td width="50%"><table id="perinfo" width="100%" border="0" cellspacing="0" cellpadding="0">'+
                          '<tr>'+
                            '<td>First Name:</td>'+
                            '<td height="26"><input name="firstname" type="text" id="firstname" /><div id="firstnamee" class="err" >*</div></td>'+
                          '</tr>'+
						  '<tr>'+
                            '<td>Last Name:</td>'+
                            '<td height="26"><input name="lastname" type="text" id="lastname" /><div id="lastnamee" class="err" >*</div></td>'+
                          '</tr>'+
						  '<tr>'+
                            '<td>Email:</td>'+
                            '<td height="26"><input name="email" type="text" id="email" /><div id="emaile" class="err" >*</div></td>'+
                          '</tr>'+
						  '<tr>'+
                            '<td>Phone:</td>'+
                            '<td height="26"><input name="phone" type="text" id="phone" /><div id="phonee" class="err" >*</div></td>'+
                          '</tr>'+
						  '<tr>'+
                            '<td>Fax:</td>'+
                            '<td height="26"><input name="fax" type="text" id="fax" /></td>'+
                          '</tr>'+
						  '<tr>'+
                            '<td>Address:</td>'+
                            '<td height="26"><input name="address" type="text" id="address" /></td>'+
                          '</tr>'+
						  '<tr>'+
                            '<td>City:</td>'+
                            '<td height="26"><input name="city" type="text" id="city" /></td>'+
                          '</tr>'+
						  '<tr>'+
                            '<td>State:</td>'+
                            '<td height="26"><input name="state" type="text" id="state" /></td>'+
                          '</tr>'+
						  '<tr>'+
                            '<td>Zip Code :</td>'+
                            '<td height="26"><input name="zipcode" type="text" id="zipcode" /></td>'+
                          '</tr>'+
                        '</table></td>'+
                        '<td width="20%"><table id="products" width="100%" border="0" cellspacing="0" cellpadding="0">'+
                          '<tr>'+
                            '<td height="24">Products</td>'+
                          '</tr>'+
                          '<tr>'+
                            '<td height="30"><input name="tile" type="checkbox" id="tile" value="checkbox" />'+
                              'Tile</td>'+
                          '</tr>'+
                          '<tr>'+
                            '<td height="30"><input name="metal" type="checkbox" id="metal" value="checkbox" /> '+
                              'Metal</td>'+
                          '</tr>'+
                          '<tr>'+
                            '<td height="30"><input name="slate" type="checkbox" id="slate" value="checkbox" />'+
                            'Slate</td>'+
                          '</tr>'+
                          '<tr>'+
                            '<td height="30"><input name="thatch" type="checkbox" id="thatch" value="checkbox" /> '+
                              'Thatch</td>'+
                          '</tr>'+
                          '<tr>'+
                            '<td height="30"><input name="wood" type="checkbox" id="wood" value="checkbox" /> '+
                              'Wood</td>'+
                          '</tr>'+
                          '<tr>'+
                            '<td height="30"><input name="others" type="checkbox" id="others" value="checkbox" /> '+
                              'Others</td>'+
                          '</tr>'+
                        '</table></td>'+
                        '<td width="30%"><p>Comments</p>'+
                        '<p>'+
                          '<textarea name="comments" rows="5" id="comments"></textarea>'+
                        '</p>'+
                        '<p align="right">'+
                          '<input id="submitbutt" type="submit" name="Submit" value="Submit" />'+
                        '</p></td>'+
                      '</tr>'+
                   '</table>'+
                '</form>'+
			  '</div>';
	},
	contact:function(){
		$('pageshow').innerHTML = '<div id="contactusinfo">'+
				  '<div align="center"><img src="images/contactitle.gif" alt="Please Contact Us for Additional Information" width="530" height="40" /></div>'+
	              '<table width="630" border="0" align="center" cellpadding="0" cellspacing="0">'+
                    '<tr valign="top">'+
                      '<td width="210" class="mailingadd">MAILING ADDRESS:<br />'+
                       '<em>PO Box 2117 <br />'+
'Lake City, FL 32056</em><br />'+
'<br /><br />'+
'PHYSICAL ADDRESS:<em><br />'+
'496 SW Ring Ct, <br />'+
'Lake City, FL 32056</em></td>'+
'                      <td width="10" valign="middle"><img src="images/contactspacer.png" alt="cotact us" width="10" height="216" /></td>'+
'                      <td width="290" class="phonecon">CONTACT BY PHONE:<br />                          <em>(800) 327-8115 (Toll Free) <br />'+
'(386) 755-3233 (fax)</em><br />'+
'<br />'+
'<br />'+
'DEPARTMENTS:<br /><em>Sales/Estimating  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;320<br />'+
'</em><em>Accounting &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;327<br />'+
'Project Managment &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;316</em></td>'+
'                    </tr>'+
'</table>'+
'</div>';
	
	},
	send_form:function(xdata){
		var ok = true;
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;		
		
		if(reg.test(xdata.email.value) == true) {
			$('emaile').innerHTML = '';	
		} else {
			$('emaile').innerHTML = ' *';		
			ok = false;
		}
		
		if(xdata.firstname.value.length<2)
		{
			$('firstnamee').innerHTML = ' *';			
			ok = false;			
		}else {
			$('firstnamee').innerHTML = '';			
		}
		if(xdata.lastname.value.length<2)
		{
			$('lastnamee').innerHTML = ' *';			
			ok = false;			
		}		else {
			$('lastnamee').innerHTML = '';			
		}
		if(xdata.phone.value.length<2)
		{
			ok = false;			
			$('phonee').innerHTML = ' *';			
		}else{
			$('phonee').innerHTML = '';			
		}
		if(ok == true)		
		{
			//;
			new Ajax.Request('info.php?'+$('inquiryform').serialize(),
		  	{
		   	 method:'get',
		    	onSuccess: function(transport){
		      	var response = transport.responseText || "no response text";
		     	 	if(response == 'true')
					{
						$('messok').innerHTML = '<h1>Your Message have been sent.</h1>';
					}
		    	},
		     onFailure: function(){ alert('Something went wrong...') }
		  	});
      		return false;				
		}else{
      		return false;			
		}
   }
};
