if(top!=window) top.location.href=window.location.href;

function gotowhere(){
if (document.selmenu.selm.selectedIndex>0){
var URL=document.selmenu.selm.options[document.selmenu.selm.selectedIndex].value;
if (URL.length>7){window.location.href = URL;}
}}

function CheckEmpty(f, theName) {
if(f.value==""){alert(theName);f.focus();f.select();return false;} else {return true;}
}

function CheckUpper(str) {
if(str.indexOf('ВИКТОРИЯ',0)>-1||str.indexOf('В И К Т О Р И Я',0)>-1||str.indexOf('В И К Т О  Р И Я',0)>-1)
{return 'Виктория'}
else if(str.indexOf('LILU',0)>-1)
{return 'Lilu'}
else if(str.indexOf('a href=',0)>-1||str.indexOf('http',0)>-1||str.indexOf('CheckUpper',0)>-1)
{return ''}
else{return str};
}

function p_bottom(name, num){
document.write('<table align=center border=0 cellpadding=30><tr align=center>');
document.write('<td>&nbsp;');
document.write('</td><td><p>* * *</p>');

if(num>0){
   document.write('<p><b><a href=http://forum.julijana.ru/showthread.php?t=' + num + '>Написать отзыв</a></b></p>');
}else{
  document.write('<p><b><a href=http://forum.julijana.ru/forumdisplay.php?f=72>Форум волшебных фотографий и картинок</a></b></p>');
}
document.write('<p>* * *</p></td><td>&nbsp;');
document.write('</td>');
document.write('</tr></table><br>');
}

function pic_bottom(num){
document.write('<table align=center border=0 cellpadding=30><tr align=center>');
document.write('<td>&nbsp;</td><td><p>* * *</p>');

if(num>0){
   document.write('<p><b><a href=http://forum.julijana.ru/showthread.php?t=' + num + '>Написать отзыв</a></b></p>');
}else{
  document.write('<p><b><a href=http://forum.julijana.ru/forumdisplay.php?f=72>Форум волшебных фотографий и картинок</a></b></p>');
}
document.write('<p>* * *</p></td><td>&nbsp;</td>');
document.write('</tr></table>');
}

function s_bottom(picname, num){
document.write('<p>* * *</p>');
if(num>0){
  document.write('<p><b><a href=http://forum.julijana.ru/showthread.php?t=' + num + '>Написать продолжение<br>или отзыв</a></b></p>');
}else{
  document.write('<p><b><a href=http://forum.julijana.ru/forumdisplay.php?f=73>Форум волшебных историй</a></b></p>');
}
document.write('<p>* * *</p>');
}

function s_top(name, email, story){
document.write('<table border=0 width=100% cellspacing=5 cellpadding=5><tr><td width=1>&nbsp;</td><td class=side3 width=1>&nbsp;</td>');
document.write('<td class=side1 width=1>&nbsp;</td><td><br><table border=0 width=100%><tr><td width=120 align=center><img src=/images/fire.gif></td><td align=center><h4>');
if(email!=""){
  var m=email.indexOf("@");
  if(m>0){document.write('<a href=mailto:' + email + '>' + name + '</a></h4><h3>' + story);}
  else{document.write('<a href=' + email + '>' + name + '</a></h4><h3>' + story);}
}else{
  document.write(name + '</h4><h3>' + story);
}
document.write('</h3></td><td width=120 align=center><img src=/images/fire.gif></p></td></tr></table></td><td class=side1 width=1>&nbsp;</td><td class=side3 width=1>&nbsp;</td><td width=1>&nbsp;</td></tr></table><br>');
}

function vip_bottom(forum, num){
document.write('<table align=center border=0 width=100% bgcolor=#eeeeee><tr align=center>');
document.write('<td align=right><a href=http://forum.julijana.ru/showthread.php?t=' + num + '>Написать комментарий или отзыв</a>&nbsp;</td></tr></table>');
}

function pics_top(name, page, story){
  document.write('<h2>Рисунки</h2>');
  document.write('<h4><a href=/art/pics/' + page + '/>' + name + ': ' + story + '</a></h4><br>');
}

function comics_top(name, page, story){
  document.write('<h2>Комиксы</h2>');
  document.write('<h4><a href=/art/comics/' + page + '/>' + name + ': ' + story + '</a></h4><br>');
}
function comics_pic(num, desc, last){
  document.write("<table border=0 align=center width=500><tr><th>"+num+". "+desc+"</th></tr></table>");
   if (last==0){
     document.write("<p><a href="+(num+1)+".shtml><img src=nagy/"+num+".jpg border=0><br><br><b>Следующая картинка >></b></a></p>");  
   }else{
     document.write("<p><a href=/art/comics/><img src=nagy/"+num+".jpg border=0><br><br>Комиксы</a></p>");
  }   
}

function artphotos_top(name, page, story){
  document.write('<h2>Фото-арт</h2>');
  document.write('<h4><a href=/art/photos/' + page + '/>' + name + ': ' + story + '</a></h4><br>');
}

function morphs_top(name, page, story){
  document.write('<h2>Анимированные картинки (Flash)</h2>');
  document.write('<h4><a href=/art/morphs/>' + name + ': ' + story + '</a></h4><br>');
}

function p_top(name, page, story){
  document.write('<h4>' + name + ': ' + story + '</h4><br>');
}

function story_illustration(num, picdir, authorname, authorpage, last){
if(num>0){
  if (last==0){document.write('<table border=0 class=story><tr><td align=right><a href='+(num+1)+'.shtml>Дальше >></a></td></tr></table>');}
  document.write('<p><a href=/stories/'+authorpage+'/><img src=/stories/'+authorpage+'/'+picdir+'/'+num+'.jpg height=384 alt="Illustrations by '+authorname+'" border=0></a></p>');
  if (last==0){document.write('<h6><a href='+(num+1)+'.shtml>Дальше >></a></h6><br>');}
}else{
  document.write('<p><b><a href=http://forum.julijana.ru/forumdisplay.php?f=73>Форум волшебных историй</a></b></p><br>');
}
}


var haveFlash = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; 

function insert_flash(swf_name, w, h){
  if( haveFlash ){
	haveFlash = (parseInt(haveFlash.description.substring(haveFlash.description.indexOf(".")-1))>=5);
  } else if ( navigator.userAgent && navigator.userAgent.indexOf( "MSIE" ) >=0
       && ( parseFloat( navigator.appVersion )  >=4)
       && ( navigator.userAgent.indexOf( "Windows 95" ) >=0                         
	 || navigator.userAgent.indexOf( "Windows NT" ) >=0                     
	 || navigator.userAgent.indexOf( "Windows 98" ) >=0 )               
    ){       
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');  
	document.write(' on error resume next \n');
	document.write(' haveFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('</SCR' + 'IPT\> \n');
  }

  if ( haveFlash ){
	document.write('<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 width='+w+' height='+h+'>');
	document.write('<param name=movie value=http://www.julijana.ru/art/morphs/swf/'+swf_name+'.swf><param name=menu value=false><param name=quality value=high>');  
	document.write('<EM' + 'BED src="http://www.julijana.ru/art/morphs/swf/'+swf_name+'.swf" quality=high ');
	document.write('menu=false swLiveConnect=FALSE width='+w+' height='+h);
	document.write('TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">');
	document.write('</EMBED>');
	document.write(' </object>'); 	 
  }else{
	document.write('<table align=center border=1 cellpadding=25><tr><td><a href=http://www.julijana.ru/art/pics/><b>У вас не установлен Flash Player / You need Flash Player</b></a></td></tr></table>');
  }
}
  
  