
		
var title_openday="25 марта 2007 года- День открытых дверей НГПУ";
var openday="<h3 align=center>День открытых дверей НГПУ</h3>\n\n";
openday+="<p><b>25 марта 2007 года в 12-00</b> НГПУ проводит День открытых дверей.<br> Приглашаются все желающие.</p>\n";
openday+="<p><b>Сбор:&nbsp;</b>1 корпус, 3-й этаж, актовый зал.</p>\n";
openday+="<p style='margin-bottom:0'><b>Программа:</b></p>\n";
openday+="<table border=1 width=100% style='font-size:1em;'>\n";
openday+="<tr><td width=20% valign=top><b>12-00</b></td>\n";
openday+="<td>-&nbsp;встреча с ответственным секретарем приемной комиссии, деканами факультетов,<br>\n";
openday+="-&nbsp;показ фильма о НГПУ,<br>\n";
openday+="-&nbsp;выступление студентов НГПУ с номерами художественной самодеятельности.</td></tr>\n";
openday+="<tr><td valign=top><b>13-00</b></td><td>знакомство с факультетами</td></tr></table>\n";
openday+="<p><b>Проезд:</b> всеми видами транспорта до остановки 'Площадь Минина'.<br>\n";
openday+="<b>Адрес:</b> ул.Ульянова, д.1.</p>\n";

var title_feb23="23 февраля- День Защитника отечества";
var feb23="<h3 align=center>Ректорат НГПУ поздравляет мужчин<br> с Днем Защитника Отечества.</h3>\n\n";
feb23+="<table width=306 align=center><tr><td><p style='text-align:center;'><img dynsrc='http://www.nnspu.ru/avi/feb23.avi' width='176' height='144' hspace='0' vspace='0' border='0' align='middle' alt='Поздравление от ректората НГПУ' start='fileopen' loop='1'></p></td></tr><tr><td><p style='text-align:center;'><a href='http://www.nnspu.ru/avi/feb23.zip'>скачать поздравление ректората НГПУ</a> <nobr>(4.2 М)</nobr></p></td></tr></table>\n";

function show_details(title,text,wm,hm) {
	var titletop="НГПУ: "+title;
	w1=window.open("","displayWindow","menubar=no, scrollbars=no, resizable=yes, width="+screen.width*wm+", height="+screen.height*hm+"");
	w1.document.write("<html>\n<head>\n\t<meta http-equiv='content-type' content='text/html; charset=window-1251'>\n\t<title>"+title+"</title>\n</head>\n<body bgcolor='#ffffff' text='#000000' style='font-size:0.8em;'>\n"+text +"\n</body>\n</html>");
	w1.document.close();
	//w1.moveTo(screen.width-screen.width/4,20);
}

function top_space(){
	if(navigator.appName.indexOf("Firefox")>-1 || navigator.appName.indexOf("Opera")>-1){
	document.open();
	document.write("<span style='height:1pt;'></span>");
	document.close();
	}
}

function m_out(id){}
function m_over(id){}

function get_new_window (title, text, url, width, height, alt, video) {
		var widthReal=width+55;
		var heightReal=height+130;
		var left=(screen.width-widthReal)/2;
		var top=(screen.height-heightReal)/2;
		var content="";
		if (video){
			//content="<img alt='"+alt+"' width='"+width+"' height='"+height+"' border='0' dynsrc='"+url+"' controls />";
content="<object><embed src='"+url+"' width='"+width+"' height='"+height+"' autostart='false'></embed></object>";
		}
		else{
			content="<img src='"+url+"' alt='"+alt+"' border='0' width='"+width+"' height='"+height+"'>";
		}
		w1=window.open("","displayWindow","menubar=no, scrollbars=no, resizable=yes, width="+widthReal+", height="+heightReal+", left="+left+", top="+top+"\"");
		w1.document.write("<html>\n<head>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=windows-1251\">\n<title>НГПУ: "+title+ "</title>\n</head>\n<body>\n<h3 align='center'>"+title+"</h3>\n<p style='font-size:90%; text-align:center;'>"+text+"</p>\n<p style='text-align:center;'>"+content+"</p>\n</body>\n</html>");
		w1.document.close();
	}

function get_new_window_text(title, text, signatire, width, height){
	var widthReal=width+55;
		var heightReal=height+130;
		var left=(screen.width-widthReal)/2;
		var top=(screen.height-heightReal)/2;
	w2=window.open("","new_window","menubar=no, scrollbars=yes, resizable=yes, width="+widthReal+", height="+heightReal+", left="+left+", top="+top+"\"");
	w2.document.write("<html>\n<head>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=windows-1251\">\n<title>НГПУ: "+title+ "</title>\n</head>\n<body>\n<p style='font-size:90%;'><strong><em>"+title+"</em></strong></p>\n<p style='font-size:80%;'>"+text+"</p>\n<table width='60%' align='right'><tr><td><p style=' font-size:70%;'><em>"+signature+"</em></p></td></tr></table></body>\n</html>");
	w2.document.close();
}

function do_you_want(text,url){
    var a=confirm(text);
    if(a){
        window.open(url,"_blank");
    }
    return;
}

function is_elem_exists(el,arr){
    if(!arr.length){return;}
    for(var i=0;i<arr.length;i++){
        if(arr[i]==el){return(1)}
    }
    return;
}

function window_big_image(title,url,width,height){
	var widthReal=width+10;
    var heightReal=height+10;
    var left=(screen.width-widthReal)/2;
    var top=(screen.top-heightReal)/2;
    var bigWindow=window.open("","big_window","menubar=no, scrollbars=yes, resizable=yes, width="+widthReal+", height="+heightReal+", left="+left+", top="+top+"\"");
    bigWindow.document.write("<html>\n<head>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=windows-1251\">\n<title>НГПУ: "+title+ "</title>\n</head>\n<body>\n<p style='font-size:90%; text-align:center;'><strong><em>"+title+"</em></strong></p>\n<p style='text-align:center;'><img src=\""+url+"\" width=\""+width+"\" height=\""+height+"\" hspace=\"2\" vspace=\"2\" align=\"absmiddle\" border=\"0\" /></p></body>\n</html>");
    bigWindow.document.close();
}

function ltrim(str) {
	var ptrn = /\s*((\S+\s*)*)/;
	return str.replace(ptrn, "$1");
}

function rtrim(str) {
	var ptrn = /((\s*\S+)*)\s*/;
	return str.replace(ptrn, "$1");
}

function trim(str) {
	str.replace(/\s+/g,/ /);
	return ltrim(rtrim(str));
}

function substr_count(str,needle){
	var num=0;
	if(!str.length){return(0);}
	for(i=0;i<str.length-1;i++){
		if(str.charAt(i)==needle){num++;}
	}
	return(num);
}

function searchTextOnPage(inputId) {
  var obj = window.document.getElementById(inputId);
  var textToFind;
  if (obj) {
  textToFind = obj.value;
  } else {
  alert("Не могу найти текст = " + inputId);
  return;
  }
  if (textToFind == "") {
  alert("Вы ничего не ввели");
  return;
  }
  document.body.innerHTML = document.body.innerHTML.replace(eval("/"+textToFind+"/g"),"<b style='color:yelow'>"+textToFind+"</b>");
  var obj = window.document.getElementById(inputId);
  obj.value = textToFind;
}

function my_random(a,b){
	//  от 0 до b: Math.floor( Math.random( ) * (b+1) )
	return (Math.floor( Math.random() * (b - a + 1) ) + a)
}

