var css_on = "#0057c7";
var css_off = "#9c9c9c";

function f_select(fl) {
	inputs = document.getElementsByTagName('input');
	for (i = 1; i < inputs.length; i++){
		if (inputs[i].type=='checkbox') {
			inputs[i].checked = fl;
		}
	}
	return;
}
function my_popup(url,w,h,title) {
	zoomw=window.open("about:blank", "_blank", "width="+(1*w+20)+", height="+(1*h+20));
	zoomw.document.write("<html><head><title>"+title+"</title></head><body style='margin:0px; background:#ffffff;'>");
	zoomw.document.write("<center><table cellpadding='0' cellpading='0' width='100%' height='100%'><tr><td width='100%' height='100%' align='center' valign='middle'>");
	zoomw.document.write("<img src='"+url+"' width='"+w+"' height='"+h+"'>");
	zoomw.document.write("</td></tr></table>");
	zoomw.document.write("</center></body></html>");
}

function flash(version, filename, name, width, height, wmode, bgcolor, menu, flashvars, salign) {
	!salign ? 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('<!-- Flash FIX v0.4 | www.mega.by -->');
	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.adobe.com/go/getflash"/>');
	document.write('</object>');
	return true;
}

function flash_innerHTML(version, filename, name, width, height, wmode, bgcolor, menu, flashvars, salign) {
	!salign ? salign="LT":"";
	htmlText='<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">'
	+'<param name="allowScriptAccess" value="sameDomain"/>'
	+'<param name="allowFullScreen" value="true"/>'
	+'<param name="wmode" value="'+wmode+'"/>'
	+'<!-- Flash FIX v0.4 | www.mega.by -->'
	+'<param name="bgcolor" value="'+bgcolor+'"/>'
	+'<param name="salign" value="'+salign+'"/>'
	+'<param name="movie" value="'+filename+'"/>'
	+'<param name="menu" value="'+menu+'"/>'
	+'<param name="quality" value="high"/>'
	+'<param name="flashvars" value="'+flashvars+'"/>'
	+'<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.adobe.com/go/getflash"/>'
	+'</object>';
	return htmlText;
}

function email(name, domain, tld, text, subject) {
	!subject ? subject="Mail from site":"";
	!text ? document.write('<a href="mailto:'+name+'@'+domain+'.'+tld+'?Subject='+subject+'">'+name+'@'+domain+'.'+tld+'</a>'):document.write('<a href="mailto:'+name+'@'+domain+'.'+tld+'?Subject='+subject+'">'+text+'</a>');
	return true;
}
