function OpSmWndw(URL,resizable,scrollbars,wHeight,wWidth)
{
var smallWindow=window.open(URL,"_blank","height="+((wHeight)?wHeight:400)+",width="+((wWidth)?wWidth:500)+",status=no,toolbar=no,menubar=no,location=no,resizable="+((resizable)?resizable:"no")+",scrollbars="+((scrollbars)?scrollbars:"yes"));
if (smallWindow != null && smallWindow.opener == null) smallWindow.opener=window;
smallWindow.focus();
//return smallWindow
}

function add_home(myLink, myClick) {
if (myClick == 1 & confirm('Хотите сделать WWW.KM.RU вашей основной страницей?')) {
open("/inc/"+myLink+"?BanCode=10", "main");
}
}
function checkName(nameEl) {
for (i=0; i < document.forms[0].length; i++) {
if (document.forms[0].elements[i].name == nameEl) {
numEl = i;
}
}
var cheatInteger, cheatString
with (document.forms[0].elements[numEl]){
cheatInteger=selectedIndex;
cheatString=options[cheatInteger].value
}
open(cheatString, "_top");
}
function inspection()
{
return true;
}

function inspectionbot()
{
return true;
}

function Open_cal (cod)
{
var msgWindow = window.open ("/tools/calendar.asp?cod="+cod+"&data="+data, "answer", "height=180,width=200,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=auto");
if (msgWindow != null && msgWindow.opener == null) msgWindow.opener=window;

	if (navigator.appVersion.charAt(0) == 4) {
		msgWindow.focus();
	}
}


function previous_image_1(url,str_img)
{
if (url.length!=0) document.images["mainpic_1"].src=url
if (str_img.length!=0) document.all.div_photo_1.innerHTML='<li>'+str_img.substring (0,55)+'<br>'+'</li>'+str_img.substring (56,str_img.length)
else document.all.div_photo_1.innerHTML=' '
}

function previous_image_2(url,str_img)
{
if (url.length!=0) document.images["mainpic_2"].src=url
if (str_img.length!=0) document.all.div_photo_2.innerHTML='<li>'+str_img.substring (0,90)+'<br>'+'</li>'+str_img.substring (91,str_img.length)
else document.all.div_photo_2.innerHTML=' '
}
function previous_image_3(url,str_img)
{
if (url.length!=0) document.images["mainpic_3"].src=url
if (str_img.length!=0) document.all.div_photo_3.innerHTML='<li>'+str_img.substring (0,55)+'<br>'+'</li>'+str_img.substring (56,str_img.length)
else document.all.div_photo_3.innerHTML=' '
}



function showDescr(x) {
	
	//alert(x)
	text=document.all(x).innerHTML
	strlen=text.length
	n=strlen-4
	text_obr=text.substring(strlen-n,strlen)
	strlen=text_obr.length
	n=strlen-4
	text_obr_k=text_obr.substring(0,strlen-4)
	document.all.foto.innerHTML=text_obr_k
	document.getElementById('foto_write').style.visibility='visible';
	}

function Open_cal_arh (id_rubr,code)
{
//alert (id_rubr);
if(code=="")
{
	var msgWindow = window.open ("/news/calendar.asp?idrubr="+escape(id_rubr)+"", "answer", "height=180,width=150,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=auto");
}else
{
	var msgWindow = window.open ("/" + code + "/calendar.asp?idrubr="+escape(id_rubr)+"&code=on", "answer", "height=180,width=150,status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=auto");
}
if (msgWindow != null && msgWindow.opener == null) msgWindow.opener=window;

	if (navigator.appVersion.charAt(0) == 4) {
		msgWindow.focus();
	}
}


