Image1= new Image(156,22)
Image1.src = "media/rep-big.png"
Image2= new Image(155,22)
Image2.src = "media/rep-small.png"
Image3= new Image(156,22)
Image3.src = "media/top-big.png"
Image4= new Image(155,22)
Image4.src = "media/top-small.png"
Image5= new Image(156,22)
Image5.src = "media/bot-big.png"
Image6= new Image(155,22)
Image6.src = "media/bot-small.png"



function closeCost(what)
{
	document.getElementById(what).style.display = "none";
	//document.getElementById('shareBox').style.display = "none";
	if(what!='showPop'){
	refreshWin(what);
	}
	//alert(document.getElementById('showWin').style.display);
	
}

function getCost(m_type, date, size, zip_from, zip_to)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
	{
	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
  catch (e)
	{
	try
	  {
	  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	catch (e)
	  {
	  alert("Your browser does not support AJAX!");
	  return false;
	  }
	}
  }
  xmlHttp.onreadystatechange=function()
	{
	if(xmlHttp.readyState==4)
	  {
		  if(m_type == 'Local'){
			  if(date!='' && size !=''){
				  document.getElementById('responseError').innerHTML="";
				  document.getElementById('showPop').style.display = "block";
				  document.getElementById('showPopSur').innerHTML=xmlHttp.responseText;
			  }else{
				  document.getElementById('responseError').innerHTML="<p>Please fill out all fields!</p>";
			  }
		  }else if(m_type == 'Interstate'){
			   if(date!='' && size !='' && zip_from !='' && zip_to !=''){
				  document.getElementById('responseError').innerHTML="";
				  document.getElementById('showPop').style.display = "block";
				  document.getElementById('showPopSur').innerHTML=xmlHttp.responseText;
			  }else{
				  document.getElementById('responseError').innerHTML="<p>Please fill out all fields!</p>";
			  }
		  }
	  
	  //document.myform.message.value = '';
	  }
	}
	
   var url="costResponse.php";
   url=url+"?m_type="+m_type;
   url=url+"&date="+date;
   url=url+"&size="+size;
   url=url+"&zip_from="+zip_from;
   url=url+"&zip_to="+zip_to;
   url=url+"&sid="+Math.random();
	 xmlHttp.open("GET",url,true);
	 xmlHttp.send(null);
  }


function openWin(){
	document.getElementById('showWin').style.display = "block";
	//document.getElementById('showPop').style.display = "none";
}
function openCont(kint){
	document.getElementById(kint).style.display = "block";
}
function openOrder(type, price){
	document.getElementById('showWin2').style.display = "block";
	document.getmove.o_type.value = type;
	document.getmove.o_price.value = price;
	document.getElementById('pType').innerHTML=type;
	document.getElementById('pPrice').innerHTML=price;
	document.getElementById('pPrice2').innerHTML=price;
}
function getMessageResponse(name, phone, email, date, size, comm, type, to, from, came)
{
	//alert("saasx");
	
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
	{
	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
  catch (e)
	{
	try
	  {
	  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	catch (e)
	  {
	  alert("Your browser does not support AJAX!");
	  return false;
	  }
	}
  }
  xmlHttp.onreadystatechange=function()
	{
	if(xmlHttp.readyState==4)
	  {
		  if(type!=''){
			  if(name!='' && phone !='' && email !='' && date !='' && size !=''){
				if(isValidEmail(email)){
				 if(type=='Interstate'){
					 if(to !=''){
						 document.getElementById('response').innerHTML="";
						 document.getElementById('shareBox').innerHTML=xmlHttp.responseText;
					 }else{
						 document.getElementById('response').innerHTML="<p>Please fill out all fields marked with *!</p>";
					 }
				 }else{
					  document.getElementById('response').innerHTML="";
					  document.getElementById('shareBox').innerHTML=xmlHttp.responseText;
				 }
				}else{
					document.getElementById('response').innerHTML="<p>A valid e-mail address is required!</p>";
				}
			  }else{
				  document.getElementById('response').innerHTML="<p>Please fill out all fields marked with *!</p>";
			  }
		  }else{
			  if(name!='' && phone !='' && email !='' && date !='' && size !=''){
				if(isValidEmail(email)){
				  document.getElementById('response11').innerHTML="";
				  document.getElementById('shareBox2').innerHTML=xmlHttp.responseText;
				}else{
				  document.getElementById('response11').innerHTML="<p>A valid e-mail address is required!</p>";
				}
			  }else{
				  document.getElementById('response11').innerHTML="<p>Please fill out all fields marked with *!</p>";
			  }
		  }
		  //document.myform.message.value = '';
	  }
	}
   var url="/contactResponseInner.php";
   url=url+"?name="+name;
   url=url+"&phone="+phone;
   url=url+"&email="+email;
   url=url+"&date="+date;
   url=url+"&type="+type;
   url=url+"&to="+to;
   url=url+"&from="+from;
   url=url+"&size="+size;
   url=url+"&comm="+comm;
   url=url+"&came="+came;
   url=url+"&sid="+Math.random();
	 xmlHttp.open("GET",url,true);
	 xmlHttp.send(null);
  }
  

function getMove(m_name,m_phone,m_email,m_date,m_time,m_size,m_number,m_street_from,m_city_from,m_state_from,m_zip_from,m_street_to,m_city_to,m_state_to,from,m_zip_to)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
	{
	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
  catch (e)
	{
	try
	  { 
	  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	catch (e)
	  {
	  alert("Your browser does not support AJAX!");
	  return false;
	  }
	}
  }
  xmlHttp.onreadystatechange=function()
	{
	if(xmlHttp.readyState==4)
	  {
			  if(m_name!='' && m_phone!='' && m_email!='' && m_date!='' && m_time!='' && m_size!='' && m_number!='' && m_street_from!='' && m_city_from!='' && m_state_from!='' && m_zip_from!='' && m_street_to!='' && m_city_to!='' && m_state_to!='' && m_zip_to!=''){
				 
				  if(isValidEmail(m_email)){
					  document.getElementById('moveError').innerHTML="";
					  document.getElementById('showWin').innerHTML=xmlHttp.responseText;
				  }else{
					   document.getElementById('moveError').innerHTML="<p>A valid e-mail address is required!</p>";
				  }
			  }else{
				  document.getElementById('moveError').innerHTML="<p>Please fill out all fields marked with *!</p>";
			  }
	  
	  //document.myform.message.value = '';
	  }
	}
   var url="/moveResponse.php";
   url=url+"?m_name="+m_name;
   url=url+"&m_phone="+m_phone;
   url=url+"&m_email="+m_email;
   url=url+"&m_date="+m_date;
   url=url+"&m_time="+m_time;
   url=url+"&m_size="+m_size;
   url=url+"&m_number="+m_number;
   url=url+"&m_street_from="+m_street_from;
   url=url+"&m_city_from="+m_city_from;
   url=url+"&m_state_from="+m_state_from;
   url=url+"&m_zip_from="+m_zip_from;
   url=url+"&m_street_to="+m_street_to;
   url=url+"&m_city_to="+m_city_to;
   url=url+"&m_state_to="+m_state_to;
   url=url+"&m_zip_to="+m_zip_to;
   url=url+"&from="+from;
   url=url+"&sid="+Math.random();
	 xmlHttp.open("GET",url,true);
	 xmlHttp.send(null);
  }

/**
 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

function isValidEmail(strEmail){
  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
  //strEmail = document.forms[0].email.value;

   // search email text for regular exp matches
    if (strEmail.search(validRegExp) == -1) 
   {
      //alert('A valid e-mail address is required.\nPlease amend and retry');
      return false;
    } 
    return true; 
}

  
  
  
  
  
  
  
function getQuote(i_name,i_phone,i_email,i_date,i_time,i_size,i_zip_from,i_zip_to)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
	{
	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
  catch (e)
	{
	try
	  { 
	  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	catch (e)
	  {
	  alert("Your browser does not support AJAX!");
	  return false;
	  }
	}
  }
  xmlHttp.onreadystatechange=function()
	{
	if(xmlHttp.readyState==4)
	  {
			  if(i_name!='' && i_phone !='' && i_email !='' && i_date !='' && i_time !='' && i_size !='' && i_zip_from !='' && i_zip_to !=''){
				if(isValidEmail(i_email)){
				  document.getElementById('interError').innerHTML="";
				  document.getElementById('interBlock').innerHTML=xmlHttp.responseText;
				}else{
				  document.getElementById('interError').innerHTML="<p>A valid e-mail address is required!</p>";
				}
			  }else{
				  document.getElementById('interError').innerHTML="<p>Please fill out all fields marked with *!</p>";
			  }
	  
	  //document.myform.message.value = '';
	  }
	}
   var url="quoteResponse.php";
   url=url+"?i_name="+i_name;
   url=url+"&i_phone="+i_phone;
   url=url+"&i_email="+i_email;
   url=url+"&i_date="+i_date;
   url=url+"&i_time="+i_time;
   url=url+"&i_size="+i_size;
   url=url+"&i_zip_from="+i_zip_from;
   url=url+"&i_zip_to="+i_zip_to;
   url=url+"&sid="+Math.random();
	 xmlHttp.open("GET",url,true);
	 xmlHttp.send(null);
  }
  
  
  
  
function getOrder(o_price,o_type,m_name,m_phone,m_email,m_street_to,m_city_to,m_state_to,m_zip_to,m_card,m_street_b,m_city_b,m_state_b,m_zip_b,m_cardn,m_exp)
  {
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
	{
	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
  catch (e)
	{
	try
	  { 
	  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	catch (e)
	  {
	  alert("Your browser does not support AJAX!");
	  return false;
	  }
	}
  }
  xmlHttp.onreadystatechange=function()
	{
	if(xmlHttp.readyState==4)
	  {
		  
			  if(o_price!='' && o_type!='' && m_name!='' && m_phone!='' && m_email!='' && m_street_to!='' && m_city_to!='' && m_state_to!='' && m_zip_to!='' && m_card!='' && m_street_b!='' && m_city_b!='' && m_state_b!='' && m_zip_b!='' && m_cardn!='' && m_exp!=''){
				if(isValidEmail(m_email)){
				  document.getElementById('moveError').innerHTML="";
				  document.getElementById('showWin2').innerHTML=xmlHttp.responseText;
				}else{
				  document.getElementById('moveError').innerHTML="<p>A valid e-mail address is required!</p>";
				}
				  
			  }else{
				  document.getElementById('moveError').innerHTML="<p>Please fill out all fields marked with *!</p>";
			  }
	  
	  //document.myform.message.value = '';
	  }
	}
   var url="orderResponse.php";
   url=url+"?o_price="+o_price;
    url=url+"&o_type="+o_type;
   url=url+"&m_name="+m_name;
   url=url+"&m_phone="+m_phone;
   url=url+"&m_email="+m_email;
   url=url+"&m_street_to="+m_street_to;
   url=url+"&m_city_to="+m_city_to;
   url=url+"&m_state_to="+m_state_to;
   url=url+"&m_zip_to="+m_zip_to;
    url=url+"&m_card="+m_card;
   url=url+"&m_street_b="+m_street_b;
   url=url+"&m_city_b="+m_city_b;
   url=url+"&m_state_b="+m_state_b;
   url=url+"&m_zip_b="+m_zip_b;
   url=url+"&m_cardn="+m_cardn;
   url=url+"&m_exp="+m_exp;
   url=url+"&sid="+Math.random();
	 xmlHttp.open("GET",url,true);
	 xmlHttp.send(null);
  }
  
  
  
  
  
function refreshWin(kint)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
	{
	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
  catch (e)
	{
	try
	  {
	  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	catch (e)
	  {
	  alert("Your browser does not support AJAX!");
	  return false;
	  }
	}
  }
  xmlHttp.onreadystatechange=function()
	{
	if(xmlHttp.readyState==4)
	  {
		document.getElementById(kint).innerHTML=xmlHttp.responseText;
	  }
	  
	  //document.myform.message.value = '';
	  }
   var url="/refreshResponse.php";
   url=url+"?kint="+kint;
   url=url+"&sid="+Math.random();
	 xmlHttp.open("GET",url,true);
	 xmlHttp.send(null);
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  