function wind(w,h)
	{
	window.open("send.php", "window","location=0,toolbar=0,menubar=0,top=10,left=10,width="+w+",height="+h);
	}
	
	function out_popup(page,did,w,h,param)
	{
	window.open(page+"?version=popup&did="+did+"&"+param, "window","location=0,scrollbars=1,toolbar=0,menubar=0,top=10,left=10,width="+w+",height="+h);
	}
	
	function photos(id,w,h)
	{
	window.open("popup_photos.php?idreport="+id, "window","location=0,toolbar=0,scrollbars=1,menubar=0,top=10,left=10,width="+w+",height="+h);
	}
	
	function vote_result(id,w,h)
	{
	window.open("/modules/vote.php?vote_result="+id, "window","location=0,toolbar=0,menubar=0,top=10,left=10,width="+w+",height="+h);
	}
	
	function ch_checkbox_count(form_name,ch_name)
{
var count = 0;
t=document.forms[form_name].elements.length;
	for(i=0;i<t;i++)
		{
str=new RegExp(ch_name,"i");
regexp=str.test(document.forms[form_name].elements[i].name);
	if(regexp==true)
	{
		if(document.forms[form_name].elements[i].checked == true)
		{
		count++;
		}
	
	}
		}
		if(count == 1)
			return true;
		else
			return false
}

function img(image) 
{
window.open("/show_img.php?image="+image,"show_img","width=200,height=200,top=0,left=0,resizable=no,location=no,scrollbars=no,status=no,toolbar=no,directories=no");
}

function ch_checkbox_zero(form_name,ch_name)
{
var count = 0;
t=document.forms[form_name].elements.length;
	for(i=0;i<t;i++)
		{
str=new RegExp(ch_name,"i");
regexp=str.test(document.forms[form_name].elements[i].name);
	if(regexp==true)
	{
		if(document.forms[form_name].elements[i].checked == true)
		{
		count++;
		}
	
	}
		}
		if(count > 0)
			return true;
		else
			return false
}

function activateFlash(name, width, height, background, style, src, wmode) {

	var code = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" standby="Loading..." type="application/x-shockwave-flash" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="' + width + '" height="' + height + '"' + style + ' id="' + name + '">'+
	'<param name="movie" value="' + src + '"/>'+
	'<param name="quality" value="high"/>'+
	'<param name="allowScriptAccess" value="sameDomain"/>'+
	'<param name="scale" value="noscale" />'+
	'<param name="swliveconnect" value="true"/>'+
	'<param name="wmode" value="' + wmode + '">'+
	'<param name="bgcolor" value="' + background + '"/>'+
	'<embed src="' + src + '" width="' + width + '" height="' + height + '" quality="high" swLiveConnect="true" wmode="' + wmode + '" bgcolor="' + background + '" scale="noscale" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="sameDomain" name="' + name + '" />'+
	'</embed></object>';

	document.write(code);

}


function forum(forum,id,idtheme,w,h)
{
window.open("/intranet_forum.html?act=add&idforum="+forum+"&idrepl="+id+"&idtheme="+idtheme, "window","location=0,toolbar=0,menubar=0,top=10,left=10,width="+w+",height="+h);
}
