
//var bv = parseFloat(navigator.appVersion.substr(navigator.appVersion.indexOf('MSIE ')+5)); 
//var ie5 = false;
//if (bv >= 5.0)
//	ie5 = true;

function ieResize(){
//window.location.reload();
// document.getElementById('All').style.display="none";
// document.getElementById('HeadLine1').style.display="none";
// document.getElementById('HeadLine2').style.display="none";
// document.getElementById('HeadLine3').style.display="none";
// document.getElementById('HeadLine4').style.display="none";

// document.getElementById('All').style.display="block";
// document.getElementById('HeadLine1').style.display="block";
// document.getElementById('HeadLine2').style.display="block";
// document.getElementById('HeadLine3').style.display="block";
// document.getElementById('HeadLine4').style.display="block";
}

if (0 && document.title.indexOf('Refer.Ru') == 0) {
	var lo = window.location;
	var main_host = 'www.refer.ru';
	var fs_host = 'files.refer.ru';	
	if (lo.host != main_host && lo.host != fs_host)
		lo.href = 'http:\/\/' + main_host + lo.pathname + lo.search;
	else if (lo.host == fs_host && lo.pathname != '/fs')
		lo.href = 'http://files.refer.ru/fs';
}

function BroId()
{
	bName = navigator.appName;
	if (bName == "Netscape") { return "n";} else { return "x";}
}

function ShowClearBox()
{
	if (!ie5) return;
	if (document.all.q_top.value)
		document.all.ClearBox.style.visibility='visible';	
}

function ClearForm()
{
	if (!ie5) return;
	document.all.q_top.value="";
	document.all.ClearBox.style.visibility='hidden';
}

function SetCookie(value,secure)
{
	var newCookie="shm="+escape(value)+
			";expires=Thu, 08-Oct-2027 16:30:00 GMT"+
			";path=/"+
			";domain=" + window.location.host +
			((secure)?";secure=" + secure                 :"");
	document.cookie=newCookie;
	location=(location.href.indexOf('#')>0)?
		(location.href.substring(0,location.href.indexOf('#')))
		:location.href;
}

function SwitchPicker()
{
	if (!ie5) return;
	if (document.all.ColorPicker) { 
		document.all.ColorPicker.style.display=document.all.ColorPicker.style.display=='none' ? '' : 'none';
	}
}

function GetCookie(name)
{
	var prefix=name+"=";
	var start=document.cookie.indexOf(prefix);
	if (start==-1) return null;
	var end=document.cookie.indexOf(";",start+prefix.length);
	if (end==-1) end=document.cookie.length;
	return unescape(document.cookie.substring(start+prefix.length,end));
}

// AShemes=new Array("yellow","orange","green","blue","darkblue","violet","gray","red","acid");
// var NColor=1;
// NColor=GetCookie("shm");
// 
//   if (!NColor) NColor=0;
//   if (NColor >= 9) NColor=0;
// 
// document.write("<link rel=\"stylesheet\" href=\"/ui/refer_" + AShemes[NColor]+".css\" type=\"text/css\"");

