function MyShowHide(id)
{
	var el = document.getElementById(id);
	if (el.style.display == 'none') el.style.display = 'block'; else el.style.display = 'none';
}

function nonspam(a_class_name)
{
    var u = "welcome";
    var d = "petr0v.ru";
    var mail = u + "@" + d;
    document.write('<a class="' +a_class_name+ '" href="mailto:' +mail+ '">' +mail+ '</a>');
}

/* open image window */
function openImgPopup(img, width, height, title)
{
	var w_width = parseInt(width, 10) + 20;
	var w_height = parseInt(height, 10) + 20;
	var w = window.open('','','menubar=no,resizable=no,width=' + w_width + ',height=' + w_height + ',toolbar=no,top=50,left=50');
	
	w.document.open();
	w.document.writeln('<html>');
	w.document.writeln('<head><title>' + title + '</title></head>');
	w.document.writeln('<body>');
	w.document.writeln('<img src="' + img + '" width="' + width + '" height="' + height + '" onclick="window.close();"/>');
	w.document.writeln('</body>');
	w.document.write('</html>');
}

/* open image window */
function openImgPopup2(img, width, height)
{
	var w_width = parseInt(width, 10) + 20;
	var w_height = parseInt(height, 10) + 20;

	var w = window.open(img,'','menubar=no,resizable=no,scrollbars=no,width=' + w_width + ',height=' + w_height + ',toolbar=no,top=50,left=50');
	w.focus();
}

/* open work detail window */
function openWorkPopup(id)
{
	var w = window.open('/works/' + id,'','menubar=no,resizable=no,scrollbars=yes,width=620,height=650,toolbar=no,top=50,left=50');
	w.focus();
}

/* open play movie window */
function openPlayPopup(file_path)
{
	var w = window.open(file_path,'','menubar=no,resizable=no,scrollbars=no,width=739,height=529,toolbar=no,top=50,left=50');
	w.focus();
}
