/*window_resize - begin*/
var d = document;
var winIE = (navigator.userAgent.indexOf("Opera")==-1 && (d.getElementById &&  d.documentElement.behaviorUrns))  ? true : false;

function bodySize(){
	if(winIE && d.documentElement.clientWidth) {
		sObj = d.getElementsByTagName("body")[0].style;
		sObj.width = (d.documentElement.clientWidth<1000) ? "1000px" : "100%";
	}
}

function init(){
	if(winIE) { bodySize(); }
}
 
onload = init;

if(winIE) { onresize = bodySize; }
/*window_resize - end*/

/*flash - begin*/
function insertFlash(width,height,path,bgcolor,align,id) {
	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="'+width+'" height="'+height+'" id="'+id+'" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+path+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('<param name="bgcolor" value="'+bgcolor+'" />');
	document.write('<embed src="'+path+'" quality="high" wmode="transparent" bgcolor="'+bgcolor+'" width="'+width+'" height="'+height+'" name="'+id+'" align="middle" menu="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
/*flash - end*/


function online ( adres,foto_tekst,sirina_okna,vysota_okna,foto_width,foto_height,poz_sleva,poz_sverhu )  
{
  myWin= open("", "displayWindow", "width="+sirina_okna+",height="+vysota_okna+",status=no,toolbar=no,menubar=no,resizable=no,left="+poz_sleva+",top="+poz_sverhu+"");
  myWin.document.open();  
  myWin.document.write("<html><head><title>Online</title><META HTTP-EQUIV='Content-Type' CONTENT='text/html; CHARSET=Windows-1251'>");
  myWin.document.write('<link href="http:\/\/www.predanie.ru\/small-osipov.css\" type=\"text\/css\" rel=\"stylesheet\">');
  myWin.document.write('<SCRIPT language=\"JavaScript\" src=\"http:\/\/www.predanie.ru\/select.js\" type=\"text\/javascript\"><\/SCRIPT>');
  myWin.document.write("</head><body bgcolor=white topmargin=0 leftmargin=0>");
  myWin.document.write("<center><br>");
  myWin.document.write("<font style=''></font>");  
  
  myWin.document.write("<embed src=http://www.predanie.ru/flvplayer.swf width=320 height=20 autostart=true allowfullscreen=true allowscriptaccess=always flashvars=&file="+foto_tekst+" /><br />");
  
  myWin.document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
		myWin.document.write("<tr><td colspan=2><img src=\"/img/sp1.gif\" width=\"1\" height=\"2\" border=\"0\"></td></tr>");
		myWin.document.write("<tr valign=middle>");

		myWin.document.write("<td class=\"to\" style=\"color: #000000; size:x-small;\" nowrap>Код записи:&nbsp;</td>");
		myWin.document.write("<td><INPUT class=\"form_login\" style=\"width: 120px;\" tabindex=\"2\" type=\"text\" id=\"pcode\" name=\"\" value=\'<object width=&quot;320&quot; height=&quot;20&quot;><param name=&quot;movie&quot; value=&quot;http://www.predanie.ru/flvplayer.swf?file="+foto_tekst+"&quot;></param><param name=&quot;wmode&quot; value=&quot;transparent&quot;></param><embed src=&quot;http://www.predanie.ru/flvplayer.swf?file="+foto_tekst+"&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;320&quot; height=&quot;20&quot;></embed></object><br /><a href=&quot;http://www.aosipov.ru/>www.aosipov.ru</a>\' OnClick=\"selectText(this);b1=true;\"></td>");
		myWin.document.write("</tr>");
		myWin.document.write("<tr><td colspan=2><img src=\"/img/sp1.gif\" width=\"1\" height=\"2\" border=\"0\"></td></tr>");
		myWin.document.write("<tr valign=middle>");
		myWin.document.write("<td class=\"to\" style=\"color: #000000; size:x-small;\" nowrap>Код для ЖЖ:&nbsp;</td>");
		myWin.document.write("<td><INPUT class=\"form_login\" style=\"width: 120px;\" tabindex=\"2\" type=\"text\" id=\"code\" name=\"\" value=\'<lj-embed><object width=&quot;320&quot; height=&quot;20&quot;><param name=&quot;movie&quot; value=&quot;http://www.predanie.ru/flvplayer.swf?file="+foto_tekst+"&quot;></param><param name=&quot;wmode&quot; value=&quot;transparent&quot;></param><embed src=&quot;http://www.predanie.ru/flvplayer.swf?file="+foto_tekst+"&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;320&quot; height=&quot;20&quot;></embed></object></lj-embed><br /><a href=&quot;http://www.aosipov.ru/>www.aosipov.ru</a>\' OnClick=\"selectText(this);b1=true;\"></td>");
		myWin.document.write("</tr>");
		myWin.document.write("<tr><td colspan=2><img src=\"/img/sp1.gif\" width=\"1\" height=\"2\" border=\"0\"></td></tr>");
		myWin.document.write("<tr valign=middle>");
		myWin.document.write("<td class=\"to\" style=\"color: #000000; size:x-small;\" nowrap>Код для LiveInternet:&nbsp;</td>");
		myWin.document.write("<td><INPUT class=\"form_login\" style=\"width: 120px;\" tabindex=\"2\" type=\"text\" id=\"licode\" name=\"\" value=\'[flash=320,20,http://www.predanie.ru/flvplayer.swf?file="+foto_tekst+"]<br /><a href=http://www.aosipov.ru/>www.aosipov.ru</a>' OnClick=\"selectText(this);b1=true;\"></td>");
		myWin.document.write("</tr>");
  myWin.document.write("</table>");
  
  myWin.document.write("<br><a target=\"_blank\" href=\"http:\/\/www.predanie.ru\/\"> <img border=\"0\" alt=\"Православный портал Предание\" title=\"Православный портал Предание\" src=\"http:\/\/www.predanie.ru\/images\/knopka2.gif\" width=\"88\" height=\"31\"></a><a target=\"_blank\" href=\"http:\/\/media.tv-soyuz.ru\/\"><img border=\"0\" alt=\"Православный телеканал «Союз»\" title=\"Православный телеканал «Союз»\" src=\"http:\/\/tv-soyuz.ru\/img\/88_31_tv-soyuz.gif\" width=\"88\" height=\"31\"></a>");
  
  myWin.document.write("</center>");    
  myWin.document.write("<br></center>");
  myWin.document.write("</body></html>");  
  myWin.document.close();
}

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
