var MarkSupported = true;
var StoredMark; 
var StoredLocationMark; 
var tr

function CheckMarkSupport()
{
	browser_name = navigator.appName;
	browser_version = parseFloat(navigator.appVersion);

	if (browser_name == "Netscape" && browser_version >= 3.0) { MarkSupported = 'true'; }
	else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0) { MarkSupported = 'true'; }
	else { MarkSupported = 'false'; }

	if (MarkSupported == 'true'){ 
	tr=new Image(); 
	tr.src="on.gif"; 
} 

}

function LoadMark(location){
	return image;
}

function ShowMark(where)
{
	if (MarkSupported == 'true')
	{
		StoredMark=where;
		StoredLocationMark=document.images[where].src;
		document.images[where].src="images/mark.gif";
	}
}

function HideMark()
{ 
	if (MarkSupported == 'true') {
		document.images[StoredMark].src=StoredLocationMark;
	}
}

function GetCSS()
{              
	if ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.substring(0,1) == "2"))
	{
	  document.write ("<link HREF=\"scripts/ie3.css\" REL=\"StyleSheet\" type=\"text/css\">");
	  return;
	}

	CheckMarkSupport();

	var A=navigator.userAgent, t=true, p="", v="";
	if (A.indexOf("Mozilla/3.")!=-1) return;

	var u="ie4";
	if (A.indexOf("Mac")!=-1){u="mac"}
	if (A.indexOf("Mozilla") !=-1 && A.indexOf("compatible")==-1) {u="nn4"};
	if (A.indexOf("Opera") !=-1) {u="ie4"};
        
	if(u=="ie4")
	{
	  document.writeln("<LINK REL=\"SHORTCUT ICON\" href=\"/favicon.ico\">");
	}
	document.write ("<link HREF=\"scripts/" + u + ".css\" REL=\"StyleSheet\" type=\"text/css\">");
}

function TopBar(Header)
{
document.writeln("<table width=100% border=0 cellspacing=0 cellpadding=0 bgcolor='#6F6F6F' height=21 class=tableFixed>");
document.write("<tr><td width=80% align=LEFT valign=MIDDLE nowrap><font face=\"Verdana, Arial\" size=2 color=White><b>");
document.write("&nbsp;&nbsp;<a HREF=\"index.html\" TARGET=\"_top\" class=topNavLink>");
document.write("<font color=White>К началу</font></a>&nbsp;&nbsp;<font color=White>|</font>");

document.write("&nbsp;&nbsp;<a HREF=\"about.html\" TARGET=\"_top\" class=topNavLink><font color=White>О нас</font></a>&nbsp;&nbsp;<font COLOR=White>|</font>");
document.write("&nbsp;&nbsp;<a HREF=\"download.html\" TARGET=\"_top\" class=topNavLink><font color=White>Скачать</font></a>&nbsp;&nbsp;<font COLOR=White>|</font>");
document.write("&nbsp;&nbsp;<a HREF=\"support.html\" TARGET=\"_top\" class=topNavLink><font color=White>Поддержка</font></a>&nbsp;&nbsp;<font COLOR=White>|</font>");
document.write("&nbsp;&nbsp;<a HREF=\"contacts.html\" TARGET=\"_top\" class=topNavLink><font color=White>Контакты</font></a>");

document.write("</b></font></td>");
document.write("<td align=RIGHT valign=TOP nowrap><font face='Arial' color=White size=3><i><b>");
document.writeln(Header);
document.write("&nbsp;&nbsp;&nbsp;</b></i></font></td></tr></table>");
document.close();
}

function RoundLabel(text)
{
document.write("<table border=0 cellspacing=0 cellpadding=0 bgcolor='#6F6F6F'><tr><td><img src='images/leftcirc.gif' width=12 height=21 border=0></td><td width=135 align=center nowrap><font class=LeftBarRoundText><b>");
document.write(text);
document.writeln("</b></font></td><td><img src='images/rightcirc.gif' width=12 height=21 border=0></td></tr></table>");
}

function RoundLink(text, url)
{
document.write("<table border=0 cellspacing=0 cellpadding=0 bgcolor='#6F6F6F'><tr><td><img src='images/leftcirc.gif' width=12 height=21 border=0></td><td width=135 align=center nowrap>");
document.write("<a href=");
document.write(url);
document.write(" class=LeftBarRoundLink><font face='verdana,arial,helvetica color=white'><b>");
document.write(text);
document.writeln("</b></font></td><td><img src='images/rightcirc.gif' width=12 height=21 border=0></td></tr></table>");
}

function writeFooter()
{
document.write("<table width=100% border=0 cellpadding=4 cellspacing=0 bgcolor='#6F6F6F'>");
document.write("<tr><td><font size=1 class=BodyTxtSm color='white'>");
document.write("<p align=center>Copyright &copy; 2000 KvantSoft. All rights reserved.<br>");
document.write("<a href=\"mailto:kvantsoft@mail.ru\" class=topNavLink>");
document.write("<font size=1 color=White><u>kvantsoft@mail.ru</u>");
document.write("</font></a></p></td></tr></table>");
document.close();
}

function writeLongFooter()
{
document.write("<p align=right><font size=1 class=BodyTxtSm><a href=\"#top\"><img src=\"images/up.gif\" border=0 WIDTH=13 HEIGHT=8 valign='bottom'");
document.write("alt=\"Back to the top\">К началу страницы</a>&nbsp;&nbsp;<br></font><br>");
writeFooter()
}

function openImage(imgSrc, imgWidth, imgHeight)
{
//popupWin= null;      
imgWidth=imgWidth+20;
imgHeight=imgHeight+20;
popupWin=window.open(imgSrc,'Image','toolbar=no,width='+imgWidth+',height='+imgHeight+',status=no,scrollbars=no,resizable=no,menubar=no,location=0,directories=0');
// focus window (only for Navigator 3.0)
if ( (navigator.appName != "Microsoft Internet Explorer") && (navigator.appVersion.substring(0,1) == "3") )
	popupWin.focus();
}

function CommonLeftBar()
{
RoundLink("Продукты","products.html");
document.writeln("<br>");
RoundLink("Услуги","service.html");
document.writeln("<br>");
RoundLink("Контакты","contacts.html");
document.writeln("<br>");
}

function OpenInNewWindow(url, text)
{
window.open(url, text);
}

function prepareContactsSubmit(frm)
{
  var checkbox = frm.elements['detailTechSupport'];
  var action;  
  if (checkbox.checked) {
	action = "mailto:kvantsoft@mail.ru";
  }
  else {
	action = "mailto:kvantsoft@mail.ru";
  }
  frm.action = action;
}

function prepareSupportSubmit(frm)
{
  frm.action = "mailto:kvantsoft@mail.ru";
}

function WriteProduct(Title, ID, ActiveItem, AboutURL, FtsURL, ViewURL)
{
RoundLabel(Title);

document.write("<table border=0 cellPadding=0 cellSpacing=0 width=100%>");

document.write("<tr height=15><td><font size=2 class=LeftBarLinkItem>");
document.write("<img src=\"images/markoff.gif\" name=\"" + ID + AboutURL + "\" width=20 height=8>&nbsp;");
if (ActiveItem != '1') 
	{document.write("<a class=NoDecor href=\"" + AboutURL + ".html\" OnMouseOver=ShowMark('" + ID + AboutURL + "') OnMouseOut=HideMark()>")};
document.write("О&nbsp;программе");
if (ActiveItem != '1') 
	{document.write("</a>")};
document.writeln("</font></td></tr>");

document.write("<tr height=15><td><font size=2 class=LeftBarLinkItem>");
document.write("<img src=\"images/markoff.gif\" name=\"" + ID + FtsURL + "\" width=20 height=8>&nbsp;");
if (ActiveItem != '2') 
	{document.write("<a class=NoDecor href=\"" + FtsURL + ".html\" OnMouseOver=ShowMark('" + ID + FtsURL + "') OnMouseOut=HideMark()>")};
document.write("Возможности");
if (ActiveItem != '2') 
	{document.write("</a>")};
document.writeln("</font></td></tr>");

document.write("<tr height=15 valign=top><td><font size=2 class=LeftBarLinkItem>");
document.write("<img src=\"images/markoff.gif\" name=\"" + ID + ViewURL + "\" width=20 height=8>&nbsp;");
if (ActiveItem != '3') 
	{document.write("<a class=NoDecor href=\"" + ViewURL + ".html\" OnMouseOver=ShowMark('" + ID + ViewURL + "') OnMouseOut=HideMark()>")};
document.write("Посмотреть");
if (ActiveItem != '3') 
	{document.write("</a>")};
document.writeln("</font></td></tr>");

document.writeln("<td><img align=left border=0 height=10 src=\"images/spacer.gif\" width=150></td></tr>");

document.write("</table>");
}

