﻿
// JavaScript Document
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function ins_node_link(N, Path, Text) {
dot = '.';
srv = 'ibank';
node = 'server'+N;
document.write('<a href=\"https://'+ node + dot + srv + dot + 'absolutbank.ru/' + Path + '\" target="_blank">');
document.write(Text + '</a>');
}
function ins_node_pic(N, Path, Text, Pic, W, H) {
dot = '.';
srv = 'ibank';
node = 'server'+N;
document.write('<a href=\"https://'+ node + dot + srv + dot + 'absolutbank.ru/' + Path + '\" target="_blank">');
document.write('<img src="' + Pic + '" width="' + W + '" height="' + H + '" hspace="1" border="0" alt="' + Text + '" />');
document.write('</a>');
}
function ins_ab_email(account) {
dog = '@';
document.write('<a class=\"linkinnews\" href=\"mailto:'+ account + dog + 'absolutbank.ru\">');
document.write(account + dog +'absolutbank.ru</a>');
}
/*
function ins_ab_email(account) {
dog = '@';
document.write('<a href=\"mailto:'+ account + dog + 'absolutbank.ru\">');
document.write(account + dog +'absolutbank.ru</a>');
}*/
function ins_ab_email_sub(account, subject) {
dog = '@';
document.write('<a href=\"mailto:'+ account + dog + 'absolutbank.ru?subject=' + subject + '\">');
document.write(account + dog +'absolutbank.ru</a>');
}
function ins_ab_pic_email(account, pic, w, h) {
dog = '@';
document.write('<a href=\"mailto:'+ account + dog + 'absolutbank.ru\">');
document.write('<img src="'+pic+'" width="'+w+'" height="'+h+'" alt="" border="0" />');
document.write('</a>');
}
function ins_ext_email(account, server) {
dog = '@';
document.write('<a href=\"mailto:'+ account + dog + server + '\">');
document.write(account + dog + server + '</a>');
}
function img_new_win(path, width, height) {
	//status=path;
	height = height + 20;
	window.open(path, null, "height="+height+",width="+width+",status=no,toolbar=no,menubar=no,location=no");
}
function fill_clipboard(objName) {
	oCode = document.getElementById(objName);
	window.clipboardData.setData("Text", oCode.value);
}
var bodyHTML = '';
function preprint(script_name) {
	bodyHTML = document.body.innerHTML;
	//alert (bodyHTML);
	if (bodyHTML.indexOf("<!--[content]-->") > 0 ) {
		var body_arr = bodyHTML.split("<!--[content]-->");
	} else {
		var body_arr = bodyHTML.split("<spliter ID='breadcrumps'>");
	}
	var bodyContent = body_arr[1] + ' ';
	if (bodyContent.indexOf("<!--[/content]-->") > 0 ) {
		var body_arr = bodyContent.split("<!--[/content]-->");
	} else {
		var body_arr = bodyContent.split("<spliter ID='right_column'>");
	}
	var bodyContent = body_arr[0] + ' ';
	// ????????? ??????
	var re = /preprint/g;
	var bodyContent = bodyContent.replace(re, 'afterprint');
	var re = /preprint/g;
	var bodyContent = bodyContent.replace(re, 'afterprint');
	var headerForPrint = '<table width="700" border="0" cellspacing="0" cellpadding="5" id="topmenu"><tr><td width="200" rowspan="2" style="padding: 0px;"><a href="/"><img src="/images/ab_logo.gif" width="200" height="44" alt="Абсолют Банк" border="0" /></a></td><td width="20"><img src="/images/dot.gif" width="20" height="1" alt="" /></td><td width="51"><a href="/press/pressreleases/index.shtml">&nbsp;НОВОСТИ</a></td><td align="center"><img src="/images/vline.gif" width="1" height="15" alt="" /></td><td width="55"><a href="/services/vacancy.shtml">Вакансии</a></td><td align="center"><img src="/images/vline.gif" width="1" height="15" alt="" /></td><td width="43"><a href="/banktoday/branches/index.shtml">Офисы</a></td><td align="center"><img src="/images/vline.gif" width="1" height="15" alt="" /></td><td width="105"><a href="/products/private/cards/cash.shtml">Банкоматы и ПВН</a></td><td align="center"><img src="/images/vline.gif" width="1" height="15" alt="" /></td><td width="55"><a href="/banktoday/partners/index.shtml">Клиенты и партнеры </a></td><td align="center"><img src="/images/vline.gif" width="1" height="15" alt="" /></td><td width="74"><a href="/services/sitemap.shtml">Карта сайта</a></td></tr></table><br /><table width="700" border="0" cellspacing="0" cellpadding="0"><tr><td>';
	var footerFromPrint = '<br /></td></tr></table><table width="700"  border="0" cellspacing="0" cellpadding="0"><tr><td class="bgfooter_left"><img src="/images/dot.gif" width="20" height="1" hspace="0" alt="" /></td><td class="bgban" align="center" height="50"><p class="contacts">Контактные телефоны:  Москва <strong>(495) 777-71-71</strong>,  Санкт-Петербург <strong>(812) 333-32-22</strong></p></td><td class="bgfooter_right"><img src="/images/dot.gif" width="20" height="1" hspace="0" alt="" /></td></tr></table><br />';
	document.body.innerHTML = headerForPrint + bodyContent + footerFromPrint;
	//alert (document.body.innerHTML);
}
function afterrpint(script_name) {
	document.body.innerHTML = bodyHTML;
}
function set_invisible(obj_id) {
	document.getElementById(obj_id).style.display = "none";
}
function switch_visible(obj_id) {
	if (document.getElementById(obj_id).style.display == "none") {
		document.getElementById(obj_id).style.display = "";
	} else {
		document.getElementById(obj_id).style.display = "none";
	}
}

function autoResize (id) {
	//alert('test');
	var newheight = 200;
	if (document.getElementById) {
		newheight = document.getElementById(id).contentWindow.document.body.scrollHeight;
	}
	if (document.all) {
		newheight = document.getElementById(id).contentWindow.document.body.offsetHeight;
	}
	document.getElementById(id).height = (newheight + 10) + "px";
}
function whichBrs() {
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1) return 'Opera';
	if (agt.indexOf("staroffice") != -1) return 'Star Office';
	if (agt.indexOf("webtv") != -1) return 'WebTV';
	if (agt.indexOf("beonex") != -1) return 'Beonex';
	if (agt.indexOf("chimera") != -1) return 'Chimera';
	if (agt.indexOf("netpositive") != -1) return 'NetPositive';
	if (agt.indexOf("phoenix") != -1) return 'Phoenix';
	if (agt.indexOf("firefox") != -1) return 'Firefox';
	if (agt.indexOf("safari") != -1) return 'Safari';
	if (agt.indexOf("skipstone") != -1) return 'SkipStone';
	if (agt.indexOf("msie") != -1) return 'Internet Explorer';
	if (agt.indexOf("netscape") != -1) return 'Netscape';
	if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
	if (agt.indexOf('\/') != -1) {
	if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
	return navigator.userAgent.substr(0,agt.indexOf('\/'));}
	else return 'Netscape';} else if (agt.indexOf(' ') != -1)
	return navigator.userAgent.substr(0,agt.indexOf(' '));
	else return navigator.userAgent;
}
function xmlhttpPost(strURL, strResObj) { // Ajax
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            document.getElementById(strResObj).innerHTML = self.xmlHttpReq.responseText;
        }
    }
    self.xmlHttpReq.send();
}
function switch_docs (onObjId, offObjId, setLine, setColor) {
	document.getElementById(onObjId).style.display = "";
	document.getElementById(offObjId).style.display = "none";
	if (setLine == 1) {
		document.getElementById(onObjId + '_td').style.borderBottomColor = "#FF6600";
		document.getElementById(offObjId + '_td').style.borderBottomColor = "#CCCCCC";
	}
	if (setColor == 1) {
		document.getElementById(onObjId + '_a').style.color = "#FF6600";
		document.getElementById(offObjId + '_a').style.color = "#999999";
	}
	return false;
}

function switch_cur (onCurId) {
	aCur = new Array('eur', 'usd', 'rub');
	for (i=0; i<aCur.length; i++) {
		if (aCur[i] == onCurId) {
			document.getElementById('tariff_' + aCur[i]).style.display = "";
			document.getElementById('tariff_' + aCur[i] + '_a').style.color = "#FF6600";
		} else {
			document.getElementById('tariff_' + aCur[i]).style.display = "none";
			document.getElementById('tariff_' + aCur[i] + '_a').style.color = "#999999";
		}		
	}
	return false;
}
function switch_bool (onBool) {
	aBool = new Array('yes', 'no');
	for (i=0; i<aBool.length; i++) {
		if (aBool[i] == onBool) {
			document.getElementById('tariff_' + aBool[i]).style.display = "";
			document.getElementById('tariff_' + aBool[i] + '_a').style.color = "#FF6600";
		} else {
			document.getElementById('tariff_' + aBool[i]).style.display = "none";
			document.getElementById('tariff_' + aBool[i] + '_a').style.color = "#999999";
		}		
	}
	return false;
}
/*новое*/
document.write('<script type=\"text\/javascript\" language=\"javascript" src=\"/js/jquery/jquery-1.4.1.js\"></script>'); 
document.write('<script type=\"text\/javascript\" language=\"javascript" src=\"/js/jquery/jquery.corner.js\"></script>');
document.write('<script type=\"text\/javascript\" language=\"javascript" src=\"/js/jquery/jquery.easing.1.3.js\"></script>');
document.write('<script type=\"text\/javascript\" language=\"javascript" src=\"/js/jquery/jquery.color.js\"></script>');

/* //новое */