var strpos = function( haystack, needle, offset)
			{ // Find position of first occurrence of a string
			  //
			  // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
			  var i = haystack.indexOf( needle, offset ); // returns -1
			  return i >= 0 ? i : false;
			}
			
var alertError = function() 
				 {
					alert("Ошибка обращения к функции :-)");
				 }
	
var returnToMain = function(url)
				   {
						if (!url) window.location.href='http://'+window.location.host;
						else location.href='http://'+location.host+'/'+url;
				   }

var menuopen = function()
			   {
				   window.location.href = 'http://'+window.location.host+'/purpose.php';
			   }

var mailform = function()
			   {
					query = 'http://'+window.location.host+'/contacts/forms/letter.php';
					getUrl(query, 'content', false, false);
					document.getElementById("formbox").style.visibility = "visible";
					document.getElementById("formbox").style.height = "255px";
			   }
			   
var unionform = function()
			   {
					query = 'http://'+window.location.host+'/contacts/forms/union.php';
					getUrl(query, 'content', false, false);
					document.getElementById("formbox").style.visibility = "visible";
					document.getElementById("formbox").style.height = "255px";
			   }
			   
var closeform = function()
				{
					document.getElementById("content").innerHTML = "";
					document.getElementById("formbox").style.visibility = "hidden";
					document.getElementById("formbox").style.height = "110px";
				}
/*
alertIe = function(){
	if (-[1,]){
//		alert("Not IE!");
	} else alert("Сайт не опитимизирован бод браузеры майкрософт интернет эксплорер.");
}
*/
//alertIe();
