// JavaScript Document www.lsifloors.com
//var srv_path = "http://www.lsifloors.com/"; //comment on 5_11_2008
var srv_path = "http://www.lsifloors.com/";
function valid_email(email)
{
		at_position = email.indexOf("@",1)
        if (at_position != -1)
		{
       		at_position = email.indexOf(".",1)
            if (at_position == -1)
            {
                      return false;
            }//if	
	   }//if
       else
       {
            	return false;
       } //else
		return true;
}//email check	
function completereq(){
$("#process").ajaxStop(function(){
   $(this).hide();
 })
}
function starteq(){
$("#process").ajaxStart(function(){
   $(this).show();
 })
}
//Function to load projects for index page
function loaddata()
{ 
      $.get("content.php",function(responseText){
	  $('#content_area').html(responseText);    
       });
      loadleftcontent()
      loadrightcontent()
  
}
function closerotating()
{
$('#process').hide();
}

function loadleftcontent()
{  
 var obj = $.ajax({
                    url:"leftcontent.php",
                    ajaxStart:starteq(),      
                    success:function(responseText){	   
	  	            $('#left_content').html(responseText);             
                     },
                    ajaxStop:completereq()     
                   });
}
function loadrightcontent()
{ 
    var pid	   = $('#pid_data').val(); 
	var obj =    $.ajax({
            	     	    url:"getimagename.php?pid="+pid, 
            	        	ajaxStart:starteq(),                  
           		             success:function(responseText){			     
                               $("#prgimg").attr({ src: responseText}), 
								//$('#right_content').html(responseText);                   	
								loadrightprddetail();   
  								$('#img').Grow(1000);
                                },						
                             ajaxStop:completereq()   
            
        
     					});
  setTimeout('loadrightcontent()', 7000);   
}
function loadrightprddetail()
{ 
    var pid	   = $('#pid_data').val();  
	var obj =    $.ajax({
            			url:"rightprjdetail.php?pid="+pid, 
            			ajaxStart:starteq(),                  
           		    	success:function(responseText){			       
                		$('#prj_detail').html(responseText); 
                        },						
                   	    ajaxStop:completereq() 
    				 });
   
}

//Functon to load products for category
// catid-argument to select products for category 
function getproductfor_cat(divname,catid)
{
    
	
	  var path = "?catid="+catid;	 
	  var closediv = $('#divopen').val() ;		
	  if(catid!=closediv)
	  {
		  if(closediv!=""){	
			
		    $('#ifxElement'+closediv).SlideOutUp("1000");			
		  }
	  }

	  $('#divopen').val(catid);	
	  $(divname).SlideInUp("1000");
	  var obj =    $.ajax({
            		url:"getcat_product.php"+path, 
            		ajaxStart:starteq(),                  
           		    success:function(responseText){
	                        $(divname).html(responseText); 	 
                             },
                    ajaxStop:completereq()   
     });
	 
	
}
//Function to show product description for products in slider
//pdid-product id
//cid-category id
function load_product(pdid,cid)
{ 
	//alert(cid);
	//var $j = jQuery.noConflict();
    /* var path = "?pid="+pdid+"&catid="+cid;   
 
         var obj = $.ajax({
            					url:"prd_detail.php"+path, 
            					ajaxStart:starteq(),                  
           		    			success:function(responseText){
								       $.getScript(srv_path+'js/jquery.js');
									   $.getScript(srv_path+'js/BetterTips/jquery-1.1.3.1.pack.js');
									   $.getScript(srv_path+'js/BetterTips/jquery.bettertip.pack.js');
									   $.getScript(srv_path+'js/interface.js');
									   $.getScript(srv_path+'js/enlargeimage.js');      
								       $('#prd_detail').html(responseText); 
       								},
                    				ajaxStop:completereq()   
                    
     });*/

	 //window.location.href	='http://www.lsifloors.com/getdetail.php?catid='+cid+'&pid='+pdid; //comment on 5_11_2008
	window.location.href='http://www.lsifloors.com/getdetail.php?catid='+cid+'&pid='+pdid;	
 
}
function getproduct(pid,cid)
{
   //var $j = jQuery.noConflict();
	 var path = "?pid="+pid+"&catid="+cid;	 
	
	  $.get("product_cat.php"+path,function(responseText){

	  $('#left_content').html(responseText); 
       });	 
	   $.get("product_desc.php"+path,function(responseText){   
	   $.getScript(srv_path+'js/jquery.js');
	   $.getScript(srv_path+'js/BetterTips/jquery-1.1.3.1.pack.js');
	   $.getScript(srv_path+'js/BetterTips/jquery.bettertip.pack.js'); 
       $.getScript(srv_path+'js/interface.js');
	   $.getScript(srv_path+'js/enlargeimage.js'); 
       $.getScript(srv_path+'scroll_script/script1.js');
	   $.getScript(srv_path+'scroll_script/script2.js');
	   $('#content_main').html(responseText); 

       });
     /* var url = "product_desc.php"+path;
	  var myAjax = new Ajax.Updater('content_main',
							  url, { 				
							  method: 'post',
							  evalScripts:true
							  //onComplete: GetCalendars('wall_calendars')
							  });*/
}
function test(id)
{//var $j = jQuery.noConflict();
	 var closediv = $('#divopen').val() ;	
	 if(id!=closediv ){
		 if(closediv!=""){
		 //alert('colse please'+closediv);
	 $('#ifxElement'+closediv).SlideOutUp(1000);}
	 }
	/*var divname = "#ifxElement"+id;
	alert(divname);
	for(i=1;i<9;i++)
	{   if(i!=id)	
	 	$('#ifxElement'+i).SlideOutUp(500);
	}*/
}
/*function order_sample_form(pid)
{//var $j = jQuery.noConflict();
$.get("order_sample.php?pid="+pid,function(responseText){		
	  $('#order_sample').html(responseText); 
	   $('#order_sample').show("1000");
   });	
}
function closeorder()
{var $ = jQuery.noConflict();
	$('#order_sample').hide("1000");
   
	}*/

	/******************  Function to show Order Sample Pop up  *****************/

function order_sample_form(pid)
{

$.get("order_sample.php?pid="+pid,function(responseText){	

$('#order_sample').show("1000");
 $('#order_sample').html(responseText); 								   
	 
	  
   });	
}
function closeorder()
{
	var form=document.order_sample_1;
	//$('#order_sample').hide("1000");
	//form.requested_by.value="";
	//form.requested_by.value="";
	//form.company.value="";
	//form.job_project_name.value="";
	//form.address.value="";
	//form.attn.value="";
	//form.phone.value="";
	//form.email.value="";
	$('#order_sample').BlindUp(1000);

  
}
function closegetarchitect()
{
	var form=document.get_architect_folder;
	//$('#order_sample').hide("1000");
		form.requested_by.value="";
		form.email.value="";
		form.company.value="";
		form.job_project_name.value="";
		form.address.value="";
		form.attn.value="";
		form.phone.value="";
		form.email.value="";
	$('#architect_folder').BlindUp(1000);

  
}
/****************   Validation for order Sample file	 ***************************/
//                    
//                    
/***********************************************************************************/
	function validate_order_sample()
 {
 	//alert('in here');
	var form=document.order_sample_1;
//	alert(form.requested_by.value);
	if(form.requested_by.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.requested_by.focus();
	  return false; 
	}
	if(form.company.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.company.focus();
	  return false; 
	}
	if(form.job_project_name.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.job_project_name.focus();
	  return false; 
	}
	if(form.address.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.address.focus();
	  return false; 
	}
	if(form.state.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.state.focus();
	  return false; 
	}
	if(form.postalcode.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.postalcode.focus();
	  return false; 
	}
	if(form.attn.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.attn.focus();
	  return false; 
	}
	if(form.phone.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.phone.focus();
	  return false; 
	}
	if(form.email.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.email.focus();
	  return false; 
	}
	if(!valid_email(form.email.value))
	{
		
	 var text	= "<font color=#FF3300>Please enter valid email adddress.</font>";  
	  document.getElementById('fields').innerHTML=text;
	  form.email.focus();
	  return false;  
	}
	if(form.size1.checked==false && form.size2.checked==false){
      var text	= "<font color=#FF3300>User must select atleast one of Sample Size.</font>";  	
//	alert("User must select atleast one of Sample Size.");
document.getElementById('fields').innerHTML=text;
		
		 return false; 
	}
     var postdata = $('#order_sample_1').formSerialize(true); 
	 //var path = postdata+"?action=addorder";	 
   // alert(postdata);
	  $.post("processOrder_sample.php?action=addorder&"+postdata,function(responseText){
	// $('#order_sample').hide("1000");
	$('#order_sample').BlindUp(1000);
	
	//form.requested_by.value="";
	//form.requested_by.value="";
	//form.company.value="";
	//form.job_project_name.value="";
	//form.address.value="";
	//form.attn.value="";
	//form.phone.value="";
	//form.email.value="";
	// alert(responseText);
       });

 }
 /*******************   Code ends here ****************************************/

function geteffect(fname)
{
//alert('ff');
 //$("#prgimg").attr({ src: fname}), 
	$('#img').Grow(1000);
}


/************  Function for technical information ***************************/
//                  
//                  
/****************************************************************************/
 function techInfo()
{
 //alert('in here');

  $.get("technicalinfo.php",function(responseText){
	      $("#Image5").attr({ src: srv_path+"images/cont.jpg"});
		  $("#Image4").attr({ src: srv_path+"images/tech1.jpg"});	
		  $('#Image2').attr({src: srv_path+"images/port.jpg"});

		  $("#portfolioId").css("color","#ffffff");
		  $("#technicalId").css("color","#484848");
		 $("#contactId").css("color","#ffffff");

	     $('#content_main').html(responseText); 
	    });
 
}
function aboutus()
{
 //alert('in here');

  $.get("about.php",function(responseText){
	      $("#Image5").attr({ src: srv_path+"images/cont.jpg"});
		  $("#Image4").attr({ src: srv_path+"images/tech1.jpg"});	
		  $('#Image2').attr({src: srv_path+"images/port.jpg"});

		  $("#portfolioId").css("color","#ffffff");
		  $("#technicalId").css("color","#484848");
		 $("#contactId").css("color","#ffffff");
		  $("aboutus").css("color","blue");	
		// $('aboutus').css='greydarka';
		 $('#content_main').html(responseText);
	    });
 
}
function aboutclass(val,catid)
{
var pageleftid='leftcontent_'+catid;
if(val=='about')
	{	
		document.getElementById('aboutus').className='activeheader';	
		document.getElementById('ourproduct').className='greydark';
		document.getElementById('projectclass').className='greydark';
		document.getElementById('whatsnew').className='greydark';
		document.getElementById('techinfo').className='greydark';
		document.getElementById('contact').className='greydark';
		if(pageleftid!='leftcontent_'+5555555555)
		{
		document.getElementById(pageleftid).className='leftlinks';
		}
	}
else if(val=='product')
	{
		document.getElementById('ourproduct').className='activeheader';	
		document.getElementById('aboutus').className='greydark';
		document.getElementById('projectclass').className='greydark';
		document.getElementById('whatsnew').className='greydark';
		document.getElementById('techinfo').className='greydark';
		document.getElementById('contact').className='greydark';
		if(pageleftid!='leftcontent_'+5555555555)
		{
		document.getElementById(pageleftid).className='leftlinks';
		}
	}
else if(val=='project')
	{
	document.getElementById('projectclass').className='activeheader';	
	document.getElementById('aboutus').className='greydark';
	document.getElementById('ourproduct').className='greydark';
	document.getElementById('whatsnew').className='greydark';
	document.getElementById('techinfo').className='greydark';
	document.getElementById('contact').className='greydark';
		if(pageleftid!='leftcontent_'+5555555555)
		{
		document.getElementById(pageleftid).className='leftlinks';
		}
	}
else if(val=='whats')
	{
		document.getElementById('whatsnew').className='activeheader';	
		document.getElementById('aboutus').className='greydark';
		document.getElementById('ourproduct').className='greydark';
		document.getElementById('projectclass').className='greydark';
		document.getElementById('techinfo').className='greydark';
		document.getElementById('contact').className='greydark';
		if(pageleftid!='leftcontent_'+5555555555)
		{
		document.getElementById(pageleftid).className='leftlinks';
		}
	}
else if(val=='tech')
	{
		document.getElementById('techinfo').className='activeheader';	
		document.getElementById('ourproduct').className='greydark';
		document.getElementById('projectclass').className='greydark';
		document.getElementById('whatsnew').className='greydark';
		document.getElementById('aboutus').className='greydark';
		document.getElementById('contact').className='greydark';
		if(pageleftid!='leftcontent_'+5555555555)
		{
		document.getElementById(pageleftid).className='leftlinks';
		}
	}
else if(val=='contact')
	{
		document.getElementById('contact').className='activeheader';	
		document.getElementById('ourproduct').className='greydark';
		document.getElementById('projectclass').className='greydark';
		document.getElementById('whatsnew').className='greydark';
		document.getElementById('techinfo').className='greydark';
		document.getElementById('aboutus').className='greydark';
		if(pageleftid!='leftcontent_'+5555555555)
		{
		document.getElementById(pageleftid).className='leftlinks';
		}
	}
}

function ourproducts()
{
 //alert('in here');

  $.get("ourproducts.php",function(responseText){
	      $("#Image5").attr({ src: srv_path+"images/cont.jpg"});
		  $("#Image4").attr({ src: srv_path+"images/tech1.jpg"});	
		  $('#Image2').attr({src: srv_path+"images/port.jpg"});

		  $("#portfolioId").css("color","#ffffff");
		  $("#technicalId").css("color","#484848");
		 $("#contactId").css("color","#ffffff");

	     $('#content_main').html(responseText); 
	    });
 
}
function whatsnew()
{
 //alert('in here');

  $.get("whatsnew.php",function(responseText){
	      $("#Image5").attr({ src: srv_path+"images/cont.jpg"});
		  $("#Image4").attr({ src: srv_path+"images/tech1.jpg"});	
		  $('#Image2').attr({src: srv_path+"images/port.jpg"});

		  $("#portfolioId").css("color","#ffffff");
		  $("#technicalId").css("color","#484848");
		 $("#contactId").css("color","#ffffff");

	     $('#content_main').html(responseText); 
	    });
 
}


function showcategory()
{
var countryID	=  $("#country").val();

var obj =    $.ajax({
            		url:"cat_sel.php?id="+countryID, 
            		            
           		    success:function(responseText){
			       
                	$('#category_sel').html(responseText);
					$("#category_sel").show();
					},
						
                    ajaxStop:completereq()   
            
        
     });
//alert('blank')
$("#datasheet").html("");
}

function getfilename()
{
	//alert('in change');
	//alert($('#country').val());
	var cvalue	= $('#country').val();
if(cvalue=="none")
{
	alert('Please Select a Country');
var obj =    $.ajax({
            		url:"cat_sel.php", 
            		            
           		    success:function(responseText){
			      
                	$('#category_sel').html(responseText);
					},
						
                    ajaxStop:completereq()   
            
        
     });
$("#datasheet").html("");
return (false);
}

	var topic_value	= $('#category').val();
	//alert(value);
	if(topic_value=='none')
	{
		//alert('Please Select a Category');	
		return false;
	}else{
    var path	= '?country_id='+cvalue+'&topic_id='+topic_value;
	//alert(path);
	
	var obj =    $.ajax({
            		url:"techrequest.php"+path, 
            		ajaxStart:starteq(),                  
           		    success:function(responseText){
			    //   alert(responseText);
                	$('#datasheet').html(responseText);
					},
						
                    ajaxStop:completereq()   
            
        
     });
	}
	
}
/////////////////////////  Functions For Contact Us Section  /////////////
//                         
//                          
//////////////////////////////////////////////////////////////////////////

function contactUs()
{
	
	//alert('hello!');
    
    $.get("contact.php",function(responseText){
		$('#Image2').attr({src: srv_path+"images/port.jpg"});
	$("#Image4").attr({ src: srv_path+"images/tech.jpg"});
    $("#Image5").attr({ src: srv_path+"images/cont1.jpg"});

	$("#portfolioId").css("color","#ffffff");
	 $("#technicalId").css("color","#ffffff");
	 $("#contactId").css("color","#484848");

	  $('#content_main').html(responseText); 
	    });
	}
/////////////////////////////////////////////////////////////////////
// FUNCTION FOR BROCHURES
//////////////////////////////////////////////////////////////////////
function brochures()
{
	
	//alert('hello!');
    
    $.get("brochure.php",function(responseText){
		$('#Image2').attr({src: srv_path+"images/port.jpg"});
	$("#Image4").attr({ src: srv_path+"images/tech.jpg"});
    $("#Image5").attr({ src: srv_path+"images/cont1.jpg"});

	$("#portfolioId").css("color","#ffffff");
	 $("#technicalId").css("color","#ffffff");
	 $("#contactId").css("color","#484848");

	  $('#content_main').html(responseText); 
	    });
	}
///////////Function to get map and form of selected country//////////////////////////
function getaddress(id)
{
//alert(id);
 var obj = $.ajax({
       url:"contactrequest.php?countryid="+id,
       ajaxStart:starteq(),      
       success:function(responseText){
	   //alert(responseText)	;   
 $.getScript(srv_path+'js/enlargeimage.js'); 
	  	    $('#contactaddress').html(responseText);             
        },
      ajaxStop:completereq()     
 });
}

function close_address()
{
	
	$('#show_address').BlindUp(1000);	
}

	//////////////////  Validation for Contact us Form ////////////

function validate_contact()
{
	//alert("in here"); 
	var form=document.country_form;
   // alert(form.name.value);
	if(form.name.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.name.focus();
	  return false; 
	}
	if(form.company.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.company.focus();
	  return false; 
	}
	if(form.address.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.address.focus();
	  return false; 
	}
	if(form.city.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.city.focus();
	  return false; 
	}
	if(form.state.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.state.focus();
	  return false; 
	}
	if(form.zip.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.zip.focus();
	  return false; 
	}
	if(form.telephone.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.telephone.focus();
	  return false; 
	}
	if(form.email.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.email.focus();
	  return false; 
	}
	if(!valid_email(form.email.value))
	{
		
	  var text	= "<font color=#FF3300>Please Enter Valid Email.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.email.focus();
	  return false; 
	}
	/*if(form.commnet.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.commnet.focus();
	  return false; 
	}*/
	var data = $('#country_form').formSerialize(true); 
	//alert(data);
	$.post("processOrder_sample.php?action=addContact&"+data,function(responseText){
			
				      $('#contactaddress').html(responseText);
				      
											 })
	}

											 //////////////////     Portfolio ////////////
	
	function portfolio()
	{
     $.get("portfolio.php",function(responseText){
	 $('#Image2').attr({src: srv_path+"images/port1.jpg"});
	 $("#Image4").attr({ src: srv_path+"images/tech.jpg"});
     $("#Image5").attr({ src: srv_path+"images/cont.jpg"});
	 $("#portfolioId").css("color","#484848");
	 $("#technicalId").css("color","#ffffff");
	 $("#contactId").css("color","#ffffff");
	 $('#content_main').html(responseText);  	
					   });		
	
	
	}
	
	function getcontent_prj(id)
{
	//pars = "&prj_id="+id;
	//alert(id);
	$.ajax({
       url:"getprjcontent.php?pid="+id,	
       ajaxStart:starteq(),      
       success:function(responseText){	  
	  // alert(responseText)
	  	    $('#content_main').html(responseText);             
        },
      ajaxStop:completereq()  
	  });
}
function getsubimg_prj(id)
{
	$("#prgsubimg").attr({ src: srv_path+"images/blank.gif"});
	$.ajax({
       url:"getsubcontent.php?prjimgid="+id,	
       ajaxStart:starteq(),      
       success:function(responseText){	  
	  // alert(responseText)
	  	$("#prgsubimg").attr({ src: responseText}), 
		 $('#prgsubimg').BlindDown(1000); 
        },
      ajaxStop:completereq()  
	  }); 
}

function loadright(imgname,name,loc,des)
{



  
  var slidehtml =   '<table width="500" ><tr><td valign="top" width="500">'


      slidehtml += 	'<td width="410" valign="top">'
	  slidehtml +=	'<img src='+imgname[0]+' width="405" height="340" id="prgimg">'
	  slidehtml +=  '</td>'


	  slidehtml +=  '<td align="center" valign="top" >'
	  
	  	slidehtml +=  '<table width="153" border="0" cellspacing="0" cellpadding="1" >'
	  	slidehtml +=  '<tr>'
      		slidehtml +=  '<td>'
				slidehtml +=  imgname[1]
	 			
					  slidehtml += '</td>'
                	  slidehtml += '</tr>'
           		 slidehtml += '</table>'


			slidehtml += '</td>'


       


	slidehtml += '</td>'
    slidehtml += '</tr>' ;
    slidehtml += '</table>' ;
	//alert(slidehtml);
  
  $("#right_content").html(slidehtml);
  $("#right_content").BlindDown(500);
curindex=(curindex<slideshowcontent.length-1)? curindex+1 : 0

   setTimeout("loadright(slideshowcontent[curindex])", imgname[2]);  
}

/**************   To Save  Architecture Form  Details ****************/
//                                     
/*************          						    ******************/

function validate_architect_folder()
{
	
	var form=document.get_architect_folder;
//	alert(form.requested_by.value);
	if(form.requested_by.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('manditory').innerHTML=text;
	  form.requested_by.focus();
	  return false; 
	}
	
	if(form.company.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('manditory').innerHTML=text;
	  form.company.focus();
	  return false; 
	}
	
	if(form.address.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.address.focus();
	  return false; 
	}
	
	if(form.attn.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.attn.focus();
	  return false; 
	}
	
	
	if(form.phone.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('showtxt').innerHTML=text;
	  form.phone.focus();
	  return false; 
	}
	
	if(form.email.value=="")
	{
	  var text	= "<font color=#FF3300>Fields marked with * are mandatory to fill.</font>";  
	  document.getElementById('manditory').innerHTML=text;
	  form.email.focus();
	  return false; 
	}
	  if(!valid_email(form.email.value))
	{
		
	 var text	= "<font color=#FF3300>Please enter valid email.</font>";  
	  document.getElementById('manditory').innerHTML=text;
	  form.email.focus();
	  return false; 
	}
	  var postdata = $('#get_architect_folder').formSerialize(true); 
	 //alert(postdata);
	  $.post("processOrder_sample.php?action=addarchitect&"+postdata,function(responseText){
		//alert(responseText);
		$('#get_architect_folder').BlindUp(1000);
		form.requested_by.value="";
		form.email.value="";
		form.company.value="";
		form.job_project_name.value="";
		form.address.value="";
		form.attn.value="";
		form.phone.value="";
		form.email.value="";
       });
}