function getBase() {
  var st=""+location.href,i;
  i=st.length;
  while(st.charAt(i)!="/"&&st.charAt(i)!="\\") i--;
  return st.substring(0,i+1);
}

function getIme() {
	var st=""+location.href,i;
  i=st.length;
  
  if (st.indexOf("=") > 0) {	
  	while(st.charAt(i)!="=" && i) i--;
  	return st.substring(i+1);
  } else
  	return false;
}

function getImeN() {
	var st=""+location.href,i;
  i=st.length;
  
  if (st.indexOf("#") > 0) {	
  	while(st.charAt(i)!="#" && i) i--;
  	return st.substring(i+1);
  } else
  	return false;
}
	
function getCurrent() {
  var st=""+location.href,i;
  i=st.length;
  if (st.indexOf("=") > 0 && st.indexOf("?") > 0) {
   	while(st.charAt(i)!="=" && i) i--;
  	std = st.substring(0,i);
  
  	i=std.length;
  	while(std.charAt(i)!="?" && i) i--;
  
  	return std.substring(i+1);
  } else 
  	return false;
}

var absolute=getBase();

function popUp(URL) {
id = "np";
eval(id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=550,left = 120,top = 40');");
np.focus();
}

function popUpTest(URL) {
var id = "npt";

eval(id + " = window.open(URL, 'newwindowtest', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=920,height=720,left = 0,top = 0');");
npt.focus();
}

function flash(flName, legend) {
if (typeof legend == "undefined")
	legend='';
	
flNameBase=flName.split(".")[0];
top.frames["materiali"].document.close();
top.frames["materiali"].document.open();
top.frames["materiali"].document.write('<html><head><META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META HTTP-EQUIV="Expires" CONTENT="-1"><script language="javascript">'+
'function flash2(flName, legend) {'+
'document.write(\'<html><body><object id="MediaPlayer" width="345" height="300" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">'+
'<param name="filename" value="'+flName+'">'+
'<PARAM NAME="AutoStart"      VALUE="true">'+
'<param name="transparentatStart" value="false">'+
'<PARAM NAME="ShowTracker"   VALUE="true">'+
'<PARAM NAME="Autosize"      VALUE="false">'+
'<PARAM NAME="ShowStatusBar"   VALUE="false">'+
'<PARAM NAME="ShowStatusBar"   VALUE="false">'+
'<PARAM NAME="currentPosition"   VALUE="0">'+
'<embed type="application/x-mplayer2" src="'+flName+'" name="MediaPlayer" width="355" height="318" autostart="1" DisplaySize="4" AutoSize="0" BgColor="#FDFDFD" ShowTracker="1" ShowDisplay="0" ShowStatusBar="0" VideoBorder3D="0"></embed>'+
'</object><div align="center" style="font: 10px Arial, Verdana normal; margin-top: 3px">'+legend+
'</div>'+
'</body></html>\');' +
'}</script></head><body>'+
'<img src="'+flNameBase+'.jpg" width="345" height="300">'+
'<div align="center" style="font: 10px Arial, Verdana normal; margin-top: 3px">'+legend+
'</div>'+
'<div align="center" style="font: 10px Arial, Verdana normal;  margin-top: 3px"><a style="font-weight: bold; text-decoration: none; color: #000000;" href="javascript: flash2(\''+flName+'\',\''+legend+'\')">Виж демонстрацията</a></div>'+
'</body></html>');
top.frames["materiali"].document.close();
}

function flash2(flName, legend) {
if (typeof legend == "undefined")
	legend='&nbsp;';

top.frames["materiali"].document.open();
top.frames["materiali"].document.write('<html><head><script language="JavaScript" src="../../flash.js"></script></head><body>\n'+
'<object id="MediaPlayer" width="345" height="300" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">\n'+
'<param name="filename" value="'+flName+'">\n'+
'<PARAM NAME="AutoStart"      VALUE="true">\n'+
'<param name="transparentatStart" value="false">\n'+
'<PARAM NAME="ShowTracker"   VALUE="true">\n'+
'<PARAM NAME="Autosize"      VALUE="false">\n'+
'<PARAM NAME="ShowStatusBar"   VALUE="false">\n'+
'<PARAM NAME="ShowStatusBar"   VALUE="false">\n'+
'<PARAM NAME="currentPosition"   VALUE="0">\n'+
'<embed type="application/x-mplayer2" src="'+flName+'" name="MediaPlayer" width="355" height="318" autostart="1" DisplaySize="4" AutoSize="0" BgColor="#FDFDFD" ShowTracker="1" ShowDisplay="0" ShowStatusBar="0" VideoBorder3D="0"></embed>\n'+
'</object><div align="center" style="font: 10px Arial, Verdana normal; margin-top: 3px">'+legend+
'</div>'+
'</body></html>');
top.frames["materiali"].document.close();
}

function image(flName, legend, targ) {
if (typeof legend == "undefined")
	legend='';
if (typeof targ == "undefined")
	targ='0';
if (targ==0) {
top.frames["materiali"].document.open();
top.frames["materiali"].document.write('<html><body>'+
'<div align="center"><img src="'+flName+'"></div>'+
'<div align="center" style="font: 10px Arial, Verdana normal; margin-top: 3px">'+legend+
'</div>'+
'</body></html>');
top.frames["materiali"].document.close();
} else {

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================
// Set the horizontal and vertical position for the popup

PositionX = 10;
PositionY = 10;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 1000;
defaultHeight = 700;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================


if (parseInt(navigator.appVersion.charAt(0))>=4) {
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
}

var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle) {

if (isNN){imgWin=window.open('about:blank','img',optNN);}

if (isIE){imgWin=window.open('about:blank','img',optIE);}

with (imgWin.document){
	writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
	writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
	writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
	writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
	writeln('width=100-(document.body.clientWidth-document.images[0].width);');
	writeln('height=100-(document.body.clientHeight-document.images[0].height);');
	writeln('window.resizeTo(width+15,height+30);}');writeln('if (isNN){');       
	writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height+30;}}');
	writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
	
	if (!AutoClose)
		writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
	else
		writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');

	writeln('<img name="George" src='+imageURL+' style="display:block"><div align="center" style="font: 10px Arial, Verdana normal; margin-top: 3px">'+legend+'</div></body></html>');
	close();		
	}
}

popImage(flName,legend);

}
}

// Дисциплина и клас за материала
var disciplina = "ЛИТЕРАТУРА";
var disciplinanobr = "ЛИТЕРАТУРА";
var klas = "11";
var cviat= 7;
var mainimg= "header_lit.jpg";
var rightbackground= "fon.jpg";

function text(size, obj) {

	var c = new Date();
	document.cookie = "fontSize=11;expires="+c.toGMTString()+";"+";";
	document.cookie = "fontSize=" + size + ";";
	
	window.location.reload();
	
}
	
function getCookie(name) {
	
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	
	if (begin == -1) {
		begin = dc.indexOf(prefix);
	
		if (begin != 0) return null;
		
	} else
		begin += 2;
		
	var end = document.cookie.indexOf(";", begin);
	
	if (end == -1)
		end = dc.length;
		
	return unescape(dc.substring(begin + prefix.length, end));
}

//set image and css
size = getCookie('fontSize');
if (size && size == 13)
	document.write("<link REL='stylesheet' HREF='"+path+"css/main"+cviat+".1.css' TYPE='text/css'>");
else if (size && size == 15)
	document.write("<link REL='stylesheet' HREF='"+path+"css/main"+cviat+".2.css' TYPE='text/css'>");
else
	document.write("<link REL='stylesheet' HREF='"+path+"css/main"+cviat+".css' TYPE='text/css'>");

var detect = navigator.userAgent.toLowerCase();

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

if (checkIt('msie')) {
	scrollbars= document.styleSheets[0].addRule("html", "behavior: url("+path+"scrollbars.htc)", 0);
}

// Имена на подстраници за съдържание, справочник, следи и контексти

var sudurzaniename = new Array;
var sudurzanieurl = new Array;
var spravochnikname = new Array;
var spravochnikurl = new Array;
var slediname = new Array;
var slediurl = new Array;
var helpname = new Array;
var helpurl = new Array;

sudurzaniename[1] = "Теми";
sudurzanieurl[1] = 1;
sudurzaniename[2] = "Самопроверка";
sudurzanieurl[2] = 2;

spravochnikname[1] = "Речник";
spravochnikurl[1] = "rechnik";
spravochnikname[2] = "Библиотека";
spravochnikurl[2] = "biblioteka";
//spravochnikname[3] = "Библиография";
//spravochnikurl[3] = "biblio";

slediname[1] = "Прочити";
slediurl[1] = "prochiti";
slediname[2] = "Написахме за вас";
slediurl[2] = "interpretacii";

helpname[1] = "Помощ";
helpurl[1] = "pomost";
helpname[2] = "Автори";
helpurl[2] = "people";

// razdel[N razdel][M urok]
var razdel = new Array();
var glava = new Array();
var razdelopisanie = new Array();
var razdelflash = new Array();
var podrazdel = new Array();
var urok = new Array();
var urokflash = new Array();
var urokopisanie = new Array();

// За всеки урок трябва да се сетнат подмасиви

urok[1] = new Array();
urokflash[1] = new Array();
urokopisanie[1] = new Array();
urok[2] = new Array();
urokflash[2] = new Array();
urokopisanie[2] = new Array();
urok[3] = new Array();
urokflash[3] = new Array();
urokopisanie[3] = new Array();
urok[4] = new Array();
urokflash[4] = new Array();
urokopisanie[4] = new Array();
urok[5] = new Array();
urokflash[5] = new Array();
urokopisanie[5] = new Array();
urok[6] = new Array();
urokflash[6] = new Array();
urokopisanie[6] = new Array();
urok[7] = new Array();
urokflash[7] = new Array();
urokopisanie[7] = new Array();
urok[8] = new Array();
urokflash[8] = new Array();
urokopisanie[8] = new Array();
urok[9] = new Array();
urokflash[9] = new Array();
urokopisanie[9] = new Array();

glavaostanali = "header_lit.jpg";

razdel[1] = "Христо Ботев";
razdelopisanie[1] = "";
podrazdel[1] = "";
//glava[1] = "head-11-botev-vazov.jpg";

urok[1][1] = "Пространството и времето на смъртта в поетическите текстове на Ботев";
urokopisanie[1][1] = "";
urok[1][2] = "Свобода и робство в поетическото творчество на Ботев";
urokopisanie[1][2] = "";
urok[1][3] = "Песен и пеене в поезията на Ботев";
urokopisanie[1][3] = "";
urok[1][4] = "Смях и плач в публицистиката на Ботев";
urokopisanie[1][4] = "";

razdel[2] = "Иван Вазов";
razdelopisanie[2] = "";
podrazdel[2] = "";
//glava[2] = "head-11-botev-vazov.jpg";

urok[2][1] = "Родното в поезията на Иван Вазов";
urokopisanie[2][1] = "";
urok[2][2] = "Памет и забрава в &quot;Епопея на забравените&quot;";
urokopisanie[2][2] = "";
urok[2][3] = "Бит, история, литература в &quot;Чичовци&quot; и &quot;Под игото&quot;";
urokopisanie[2][3] = "";
urok[2][4] = "&quot;Новата България&quot; в разказите на Иван Вазов";
urokopisanie[2][4] = "";

razdel[3] = "Алеко Константинов";
razdelopisanie[3] = "";
podrazdel[3] = "";
//glava[3] = "head-11-aleko.jpg";

urok[3][1] = "&quot;Власт&quot; и &quot;слово&quot; във фейлетоните на Алеко Константинов";
urokopisanie[3][1] = "";
urok[3][2] = "&quot;Българинът&quot; и &quot;другите&quot; в &quot;Бай Ганьо&quot;";
urokopisanie[3][2] = "";

razdel[4] = "Литературната идеология на кръга &quot;Мисъл&quot;";
razdelopisanie[4] = "";
podrazdel[4] = "";

urok[4][1] = "Литературната идеология на кръга &quot;Мисъл&quot;";
urokopisanie[4][1] = "";

razdel[5] = "Пенчо Славейков";
razdelopisanie[5] = "";
podrazdel[5] = "";

urok[5][1] = "Блянът по &quot;другия бряг&quot; в творчеството на Пенчо Славейков";
urokopisanie[5][1] = "";
urok[5][2] = "Човекът като творец на живота в творчеството на Пенчо Славейков";
urokopisanie[5][2] = "";

razdel[6] = "П. К. Яворов";
razdelopisanie[6] = "";
podrazdel[6] = "";

urok[6][1] = "Слепота и прозрения в поезията на Пейо Яворов";
urokopisanie[6][1] = "";
urok[6][2] = "Трагичното в творчеството на Яворов";
urokopisanie[6][2] = "";

razdel[7] = "Елин Пелин";
razdelopisanie[7] = "";
podrazdel[7] = "";
//glava[7] = "head-11-elin-pelin.jpg";

urok[7][1] = "&quot;Тукашно&quot; и &quot;друго&quot; в разказите на Елин Пелин";
urokopisanie[7][1] = "";
urok[7][2] = "&quot;Гераците&quot; – притча за доброто и злото";
urokopisanie[7][2] = "";

razdel[8] = "Димчо Дебелянов";
razdelopisanie[8] = "";
podrazdel[8] = "";

urok[8][1] = "Блян и спомен в поезията Димчо Дебелянов";
urokopisanie[8][1] = "";

razdel[9] = "Николай Лилиев";
razdelopisanie[9] = "";
podrazdel[9] = "";

urok[9][1] = "Музика и мълчание в поезията Николай Лилиев";
urokopisanie[9][1] = "";

razdelflash[1] = "test-Botev.swf";
razdelflash[2] = "test-Vazov.swf";
razdelflash[3] = "test-AlekoK.swf";
razdelflash[4] = "test-misal.swf";
razdelflash[5] = "test-Slaveikov.swf";
razdelflash[6] = "test-Yavorov.swf";
razdelflash[7] = "test-ElinPelin.swf";
razdelflash[8] = "test-Debelyanov.swf";
razdelflash[9] = "test-Liliev.swf";