function show(o)
{
	var imgs = o.getElementsByTagName('img');
	if (!imgs)
		return;
	var img = imgs[0];
	if (!img)
		return;

	var src = img.getAttribute('src').replace(/^.*url\=(.*)$/, '$1');
	document.getElementById('image').innerHTML = '<img src="/cms/fb/vi?w=640&amp;h=480&amp;url='+src+'" />';
}

var scrolltimer = null;

function scrollleft()
{
	var o = document.getElementById('scroll');
	if (!o)
		return;
	o.scrollLeft -= 4;
}

function scrollright()
{
	var o = document.getElementById('scroll');
	if (!o)
		return;
	o.scrollLeft += 4;
}

function left()
{
	if (scrolltimer)
		clearInterval(scrolltimer);
	scrolltimer = setInterval(scrollleft, 20);
}

function right()
{
	if (scrolltimer)
		clearInterval(scrolltimer);
	scrolltimer = setInterval(scrollright, 20);
}

function scrollstop()
{
	clearInterval(scrolltimer);
}

function insertFlash(src, w, h)
{
	var o = document.getElementById('mainimage');
	var width = 0.9 * o.offsetWidth;
	var height = parseInt(width * h / w);
	o.innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \
	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"\
	width="'+width+'" height="'+height+'" id="price" align="middle">\
	<param name="allowScriptAccess" value="sameDomain"/>\
	<param name="movie" value="'+src+'"/>\
	<param name="quality" value="high"/>\
	<param name="wmode" value="transparent"/>\
	<embed src="'+src+'" quality="high" wmode="transparent" width="'+width+'" height="'+height+'" name="price"\
		align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"\
		pluginspage="http://www.macromedia.com/go/getflashplayer"/>\
</object>';
}
function resizimg_m() 
{
	document.getElementById('main_imgshka').style.width = document.body.clientWidth - 295 +'px';	
}
function resizimg() 
{
	document.getElementById('portf_imgshka11').style.width = (document.body.clientWidth-70)/3 +'px';
	document.getElementById('portf_imgshka12').style.width = (document.body.clientWidth-70)/3 +'px';
	document.getElementById('portf_imgshka13').style.width = (document.body.clientWidth-70)/3 +'px';	
}
