function onp(pos) {
	pos.style.border="1px solid #818181";
	pos.style.filter="color";
}

function offp(pos) {
	pos.style.border="1px solid #c1c1c1";
	pos.style.filter="gray";
}

function one_on(pos) {
	pos.style.border="1px solid #818181";
}

function one_off(pos) {
	pos.style.border="1px solid #c1c1c1";
}

function flash (version, filename, name, width, height, wmode, bgcolor, menu, flashvars) {
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+"' width='"+width+"' height='"+height+"' id='"+name+"' align='middle'>");
	document.write("<param name='FlashVars' value='"+flashvars+"' />");
	document.write("<param name='allowScriptAccess' value='sameDomain' />");
	document.write("<param name='wmode' value='"+wmode+"' />");
	document.write("<!-- Flash FIX v0.1 | www.mega.by -->");
	document.write("<param name='bgcolor' value='"+bgcolor+"' />");
	document.write("<param name='salign' value='lt' />");
	document.write("<param name='movie' value='"+filename+"' /><param name='menu' value='"+menu+"' /><param name='quality' value='high' /><embed src='"+filename+"' wmode='"+wmode+"' menu='"+menu+"' quality='high' FLashVars='"+flashvars+"' salign='lt' width='"+width+"' height='"+height+"' bgcolor='"+bgcolor+"' name='"+name+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

function view_ru(big, small) {
	s=small.src.split("img=");
	b=document.getElementById(big).src.split("img=");
	document.getElementById(big).src=b[0]+'img='+s[1];
	small.src=s[0]+'img='+b[1];
}

function view(big, small) {
	var s=small.src;
	var s_a=s.split("_");
		s=s_a[0]+"_"+s_a[1]+"_ph.jpg";
	var b=document.getElementById(big).src;
		b=b.substr(0,b.length-7)+"_phsm.jpg";
		document.getElementById(big).src=s;
		small.src=b;
}

on=1;
divh=0;
divh_start=0;
y=0;

function move(id) {
	if(on) {
		if(document.getElementById(id)) {
			if(document.all) {
				ydiff=divh_start-document.body.scrollTop;
			} else {
				ydiff=divh_start-pageYOffset;
			}	
			if(ydiff!=0) {
				movey=Math.round(ydiff/15);
				divh_start-=movey;
			}
			y=divh_start+divh;
			if(y>document.getElementById('top').offsetTop+5 && y<document.getElementById('bottom').offsetTop-751) {
				document.getElementById(id).style.top=y-130;
			}
		}
	}
}
