
    function jsInclude(url)
    {
      document.write('<scr' + 'ipt type="text/javascript" src="' + url + '"></scr' + 'ipt>');
    }
    function cssInclude(url)
    {
      document.write('<link href="' + url + '" type="text/css" rel="stylesheet"></link>');
    }

	// skrypty strony
    
    
	// skrypty modułów
    
          function MM_openBrWindowTour(theURL,winName,features) { 
			  window.open(theURL,winName,features); 
		  } 
		  	
          function MM_openBrWindow(theURL,winName,features) { 
		  var v = validateForm(); 
		  if (v) { 
		  var qs = new Querystring(); 
		  
		  	if (document.getElementById('ClientType1').checked==true) var ClientType = 'Buyer';
			if (document.getElementById('ClientType2').checked==true) var ClientType = 'Seller';
			if (document.getElementById('ClientType3').checked==true) var ClientType = 'Renter';
			  
		  window.open(theURL+'?Name='+document.forms.fFormularzKontaktowy.Name.value+'&amp;Phone='+document.forms.fFormularzKontaktowy.Phone.value+'&amp;Comments='+document.forms.fFormularzKontaktowy.Comments.value+'&amp;Email='+document.forms.fFormularzKontaktowy.Email.value+'&amp;Address='+document.forms.fFormularzKontaktowy.Address.value+'&amp;City='+document.forms.fFormularzKontaktowy.City.value+'&amp;State='+document.forms.fFormularzKontaktowy.State.value+'&amp;Zip='+document.forms.fFormularzKontaktowy.Zip.value+'&amp;ClientType='+ClientType+'&amp;$SendTitle=Request about property from website&amp;$SendOK=Your e-mail has been sent. <br />You will be contacted within 24 hours of receipt of this message. <br />Thank you for contacting The BRC Group. <br />Your message is very important to us!&amp;$SendBAD=Błąd wysłania&amp;$SendEmail=mybrcgroup@gmail.com,ania@addoptimization.com&amp;Property='+document.forms.fFormularzKontaktowy.Adr.value,winName,features); 
		  } 
		  } 
		  
		  function Querystring() 
		  { 
		   querystring=location.search.substring(1,location.search.length); 
		   var args = querystring.split(''); 
		   for (var i=0;i<args.length;i++) 
		   { 
		   var pair = args[i].split('='); 
		   temp = unescape(pair[0]).split('+'); 
		   name = temp.join(' '); 
		   temp = unescape(pair[1]).split('+'); 
		   value = temp.join(' '); 
		   this[name]=value; 
	} 
	this.get=Querystring_get; 
	} 
	
	function Querystring_get(strKey,strDefault) 
	{ 
	var value=this[strKey]; 
	if (value==null) { 
	value=strDefault; 
	} 
	return value; 
	} 
	
	var qs = new Querystring(); 
	window.onload=setFocus;
	function setFocus() {  
	
	} 
	
	function validateForm() 
	{ 
	
	if (!document.forms.fFormularzKontaktowy.Name.value) 
	{
		alert("Write Name"); 
		document.forms.fFormularzKontaktowy.Name.focus(); 
		return false; 
	} 
	
	if (!document.forms.fFormularzKontaktowy.Email.value) 
	{ 
		alert("Write Email");
		document.forms.fFormularzKontaktowy.Email.focus(); 
		return false; 
	}
	
	if (!document.forms.fFormularzKontaktowy.Phone.value) 
	{ 
		alert("Write Phone"); 
		document.forms.fFormularzKontaktowy.Phone.focus(); 
		return false; 
	} 
			
	return true; 
	}


