function panel_style(kid) {

document.write("<link href='http://panel.krs-ix.ru/style/"+kid+".css' rel='stylesheet' type='text/css' />")

}


function panel_write(kid) {
	
	var ref=["passport", "krasfiles", "krasphone", "krastalk", "krasman", "krasgames", "krastv", "krasradio", "dc"]

document.write("<!-- Начало верхнего меню -->")
document.write("<div style='z-index: 0;'><img src='http://panel.krs-ix.ru/img/none.gif' width='100%' height='28px'></div>")
document.write("<div class='wp_body' id='wp_body'>")
document.write("<div class='wp_main'>")
document.write("<img src='http://panel.krs-ix.ru/img/none.gif' width='11' height='11'style='float: left; margin: 6px 0 0 8px;'/>")
document.write("<a href='http://www.krs-ix.ru/forums/' target='_blank' title='Форум поддержки'><img src='http://panel.krs-ix.ru/img/arrow-"+kid+".gif' width='11' height='11' alt='Форум поддержки' style='float: right; margin: 8px 8px 0 0;'/></a>")
document.write("<div class='wp_menu'>")

document.write("<a class='wp_body' style='background-image: url(http://panel.krs-ix.ru/img/icon2.png); background-repeat: no-repeat; height: 26px;' href='http://www.krastv.ru#"+ref[kid]+"' title='Красноярский телевизор и архив телепередач' target='_blank'><span>Телевизор</span></a>")
document.write("<div class='wp_wbr'></div>")
document.write("<a class='wp_body' style='background-image: url(http://panel.krs-ix.ru/img/icon8.png); background-repeat: no-repeat; height: 26px;' href='http://www.krastalk.ru#"+ref[kid]+"' title='Безграничное общение: почта, чаты, ICQ' target='_blank'><span>Общение</span></a>")
document.write("<div class='wp_wbr'></div>")
document.write("<a class='wp_body' style='background-image: url(http://panel.krs-ix.ru/img/icon3.png); background-repeat: no-repeat; height: 26px;' href='http://www.krasradio.ru#"+ref[kid]+"' title='Твои любимые радиостанции' target='_blank'><span>Радио</span></a>")
document.write("<div class='wp_wbr'></div>")
document.write("<a class='wp_body' style='background-image: url(http://panel.krs-ix.ru/img/icon6.png); background-repeat: no-repeat; height: 26px;' href='http://www.krasfiles.ru#"+ref[kid]+"' title='Файловая помойка на 16 терабайт' target='_blank'><span>Файлы</span></a>")
document.write("<div class='wp_wbr'></div>")
document.write("<a class='wp_body' style='background-image: url(http://panel.krs-ix.ru/img/icon5.png); background-repeat: no-repeat; height: 26px;' href='http://www.krasgames.ru#"+ref[kid]+"' title='Красноярский игровой портал' target='_blank'><span>Игры</span></a>")
document.write("<div class='wp_wbr'></div>")
document.write("<a class='wp_body' style='background-image: url(http://panel.krs-ix.ru/img/icon4.png); background-repeat: no-repeat; height: 26px;' href='http://www.krasphone.ru#"+ref[kid]+"' title='Бесплатные звонки с компьютера' target='_blank'><span>Телефон</span></a>")
document.write("<div class='wp_wbr'></div>")
document.write("<a class='wp_body' style='background-image: url(http://panel.krs-ix.ru/img/icon9.png); background-repeat: no-repeat; height: 26px;' href='http://live.krsn.ru#"+ref[kid]+"' title='Живое видео с камер Красноярска' target='_blank'><span>Наблюдение</span></a>")
document.write("<div class='wp_wbr'></div>")
document.write("<a class='wp_body' style='background-image: url(http://panel.krs-ix.ru/img/icon7.png); background-repeat: no-repeat; height: 26px;' href='http://www.krasman.ru#"+ref[kid]+"' title='Получи домен для своего сайта!' target='_blank'><span>Домены</span></a>")
document.write("<div class='wp_wbr'></div>")
document.write("<a class='wp_body' style='background-image: url(http://panel.krs-ix.ru/img/icon1.png); background-repeat: no-repeat; height: 26px;' href='http://www.krs-ix.ru#"+ref[kid]+"' title='Официальный сайт пиринговой сети KRS-IX' target='_blank'><span>Провайдеры</span></a>")

document.write("</div>")
document.write("</div>")
document.write("</div>")

	document.write("<!-- Конец верхнего меню -->")

}

if (navigator.appName != "Opera"){

var supersleight	= function() {
	
	var root = false;
	var applyPositioning = true;
	
	// Path to a transparent GIF image
	var shim			= 'http://panel.krs-ix.ru/img/none.gif';
	
	// RegExp to match above GIF image name
	var shim_pattern	= '/none\.gif$/i';
	
	
	
	var fnLoadPngs = function() { 
		if (root) {
			root = document.getElementById(root);
		}else{
			root = document;
		}
		for (var i = root.all.length - 1, obj = null; (obj = root.all[i]); i--) {
			// background pngs
			if (obj.currentStyle.backgroundImage.match(/\.png/i) !== null) {
				bg_fnFixPng(obj);
			}
			// image elements
			if (obj.tagName=='IMG' && obj.src.match(/\.png$/i) !== null){
				el_fnFixPng(obj);
			}
			// apply position to 'active' elements
			if (applyPositioning && (obj.tagName=='A' || obj.tagName=='INPUT') && obj.style.position === ''){
				obj.style.position = 'relative';
			}
		}
	};

	var bg_fnFixPng = function(obj) {
		var mode = 'scale';
		var bg	= obj.currentStyle.backgroundImage;
		var src = bg.substring(5,bg.length-2);
		if (obj.currentStyle.backgroundRepeat == 'no-repeat') {
			mode = 'crop';
		}
		obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='" + mode + "')";
		obj.style.backgroundImage = 'url('+shim+')';
	};

	var el_fnFixPng = function(img) {
		var src = img.src;
		img.style.width = img.width + "px";
		img.style.height = img.height + "px";
		img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
		img.src = shim;
	};
	
	var addLoadEvent = function(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {
					oldonload();
				}
				func();
			};
		}
	};
	
	return {
		init: function() { 
			addLoadEvent(fnLoadPngs);
		},
		
		limitTo: function(el) {
			root = el;
		},
		
		run: function() {
			fnLoadPngs();
		}
	};
}();

// limit to part of the page ... pass an ID to limitTo:
// supersleight.limitTo('header');

supersleight.init();
}