function Forz(id) {
	PopElem=document.getElementById(id);
	if (PopElem.style.display=='none'){ 
		PopElem.style.display='block';
	}else{
		PopElem.style.display='none';
	}
}

function SetItem (items, catname, inp, f){
	if(inp){
		document.getElementById(inp).value = items;
		document.getElementById('item_'+f).innerHTML = catname;
		Forz (f);
	}
}

function SetPrice(sVar, sName){
		document.getElementById('price').value = sVar;
		document.getElementById('price_n').value = sName;
		document.getElementById('pricelist').submit();
}

function Menu(i, act){
	if(act=='over'){
		document.getElementById('mf_'+i).bgColor='#4a5454';
		document.getElementById('m'+i).style.color='#FFFFFF';
	}else{
		document.getElementById('mf_'+i).bgColor='#D3D6C8';
		document.getElementById('m'+i).style.color='#4a5454';
	}	
}

function SortPrice(chto, kak, list){
	document.getElementById('sorter').value=chto;
	document.getElementById('sort').value=kak;
	document.getElementById('list').value=list;
	document.getElementById('Sorting').submit();
}

function Swf(file, w, h){
	obj = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' codetype='application/x-shockwave-flash' type='application/x-shockwave-flash' width='"+w+"' height='"+h+"'><param name='wmode' value='transparent' /><param name='movie' value='" + window.location.protocol + "//" + window.location.host + "/" + file + "' /><param name='menu' value='false' /><param name='quality' value='best' /><param name='bgcolor' value='#000000' /><param name='loop' value='false'><embed src='" + window.location.protocol + "//" + window.location.host + "/" + file + "' width='"+w+"' height='"+h+"' loop='false' wmode='transparent' menu='false' quality='best' bgcolor='#000000' type='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' /></object>";
	document.write(obj);
}
