var os=0;
function fade_in(id) {
	on=0;
	document.getElementById(id).style.display='block';
	document.getElementById(id).style.opacity=os/100;
	document.getElementById(id).style.filter="alpha(opacity="+os+")";
	os+=10;
	if(os<=100) {
		setTimeout("fade_in('"+id+"')", 1);
	} else {
		return;
	}
}

function pclose(id) {
	document.getElementById(id).style.display='none';
}

function flash(version, filename, name, width, height, wmode, bgcolor, menu, flashvars, salign) {
	salign==false ? salign="lt":"";
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+'" width="'+width+'" height="'+height+'" id="'+name+'" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain"/>');
	document.write('<param name="allowFullScreen" value="true"/>');
	document.write('<param name="wmode" value="'+wmode+'"/>');
	document.write('<param name="bgcolor" value="'+bgcolor+'"/>');
	document.write('<param name="salign" value="'+salign+'"/>');
	document.write('<param name="movie" value="'+filename+'"/>');
	document.write('<param name="menu" value="'+menu+'"/>');
	document.write('<param name="quality" value="high"/>');
	document.write('<param name="flashvars" value="'+flashvars+'"/>');
	document.write('<embed src="'+filename+'" wmode="'+wmode+'" menu="'+menu+'" quality="high" flashvars="'+flashvars+'" salign="'+salign+'" width="'+width+'" height="'+height+'" bgcolor="'+bgcolor+'" name="'+name+'" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>');
	document.write('</object>');
	return true;
}

function email(name, domain, tld, text, subject) {
	if(subject) {	
	} else {
		subject='Письмо с сайта';
	}
	if(text) {
		if(subject) {
			document.write('<a href="mailto:'+name+'@'+domain+'.'+tld+'?Subject='+subject+'">'+text+'</a>');
		} else {
		}
	} else {
		document.write('<a href="mailto:'+name+'@'+domain+'.'+tld+'?Subject='+subject+'">'+name+'@'+domain+'.'+tld+'</a>');
	}
}
