var cookpref="mihailov"
var cookname1="Flash"
var duration=365
var path="/"
var domain="mihailov.ru"
var swfurl="/flash/v2.swf"


var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var flashIsDisabled = true
var myTim

function go(n) {
  if (flashIsDisabled) return
  var headObj = InternetExplorer ? head : document.head;
  clearTimeout(myTim)
  if (n!=-1)
    headObj.SetVariable("controller:sec2go",n)
  else
    myTim=setTimeout('(InternetExplorer ? head : document.head).SetVariable("controller:sec2go",'+n+')',300)
}

function GenTime(n) {
  oDate=new Date()
  msDate=(oDate.getTime())+(1000*60*60*24*n)
  tempDate=new Date()
  tempDate.setTime(msDate)
  var curDay=tempDate.getDate(), curMonth=tempDate.getMonth(), curYear=tempDate.getYear()
  if (curYear<1900) curYear+=1900
  tempObj = new Date(curYear,curMonth,curDay)
  return tempObj
}

function GetCookie(Name) {
  var CookName = Name + "="
  var DocCook  = document.cookie
  if (DocCook.length > 0) {
    Start = DocCook.indexOf(CookName)
    if (Start != -1) {
      Start += CookName.length
      End = DocCook.indexOf(";",Start)
      if (End == -1) End = DocCook.length
      return unescape(DocCook.substring(Start, End))
    }
  }
  return null
}

function SetCookie(name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

flashIsDisabled = GetCookie(cookpref+cookname1)=="disabled"

function showHideFlash() {
  if (!flashIsDisabled) SetCookie(cookpref+cookname1,"disabled",GenTime(duration),path,domain)
  else SetCookie(cookpref+cookname1,"",GenTime(0),path,domain)
  location.reload()
}

if(type==1)
{
	if (!flashIsDisabled) {
	  document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'+
		'  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" '+
		' ID="index1" WIDTH="750" HEIGHT="437" ALIGN="middle">'+
		' <param name="allowScriptAccess" value="sameDomain" />' +
		' <PARAM NAME=movie VALUE="/flash/index1.swf?dir=/flash/"> '+
		' <PARAM NAME=menu VALUE="false"> '+
		' <PARAM NAME=quality VALUE="high"> '+
		' <PARAM NAME=bgcolor VALUE="#1a3676"> '+
		' <EMBED src="/flash/index1.swf?dir=/flash/" menu="false" quality="high" bgcolor="#1a3676" width="750" height="437" name="index1" align="middle"  '+
		' allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">'+
		' </EMBED>'+
		' </OBJECT>');
	} else {
	  document.write('<table width="750" border="0" cellpadding="0" cellspacing="0">');
	  document.write('<tr><td><IMG SRC="'+noFlashImg1+'" width="750" height="372" border="0" usemap="#main1_Map" ></td></tr>');
	  document.write('<tr><td><IMG SRC="'+noFlashImg2+'" width="750" height="65" border="0" usemap="#main2_Map" ></td></tr>');
	  document.write('</table>');
	}
}

if(type==2)
{
	if (!flashIsDisabled) {
	  document.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"'+
		'  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" '+
		' ID="head" WIDTH="750" HEIGHT="200" ALIGN="middle">'+
		' <param name="allowScriptAccess" value="sameDomain" />' +
		' <PARAM NAME=movie VALUE="/flash/v2.swf"> '+
		' <PARAM NAME=menu VALUE="false"> '+
		' <PARAM NAME=quality VALUE="high"> '+
		' <PARAM NAME=bgcolor VALUE="#1a3676"> '+
		'<PARAM NAME=FlashVars VALUE="track='+track+'&stitle='+stitle+'&dir=/flash/">'+
		' <EMBED src="/flash/v2.swf" FlashVars="track='+track+'&stitle='+stitle+'&dir=/flash/" menu="false" quality="high" bgcolor="#1a3676" width="750" height="200" name="v2" align="middle"  '+
		' allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">'+
		' </EMBED>'+
		' </OBJECT>');
	} else {
	  document.write('<IMG SRC="'+noFlashImg+'" WIDTH="750" HEIGHT="200" BORDER=0 usemap="#head_Map">');
	}
}