var images = new Array();
var imgURLs = new Array('inf_about','serv_mem','find_meet');
function init()
{
	for (var i=0;i<imgURLs.length;i++)
	{
		images[i] = document.createElement('img');
		images[i].src = '/images/'+imgURLs[i]+'_over.jpg';
	}
}

function bgfuncs(color, color2){
	if(color != '' && color2 != ''){
	//$('div.inner-box').css('background',color);
	$('div.inner-boxcontent').css('background',color);
	$('div.inner-boxcontent').css('color',color2);
	$('.r2').css('background',color);
	$('.r1').css('background',color);
	$('.r3').css('background',color);
	$('.r5').css('background',color);
	$('.inner-boxcontent a').css('color',color2);
	/*$('b.r5lh').css('background',color);
	$('b.r3lh').css('background',color);
	$('b.r2lh').css('background',color);
	$('b.r1lh').css('background',color);
	*/
	}
}

function showSubs(id,active)
{
	if (active)
	{
		document.getElementById('sub_'+id).style.top='-10px';
		document.getElementById('sub_'+id).style.left='5px';
	}
	else	
		document.getElementById('mi_'+id).style.background="#1d77c0";
		
	document.getElementById('sub_'+id).style.display = 'block';	
}

function hideSubs(id,active)
{
	if (active)
	{
		document.getElementById('sub_'+id).style.top='0px';
		document.getElementById('sub_'+id).style.left='0px';
	}
	
	document.getElementById('sub_'+id).style.display = 'none';
	document.getElementById('mi_'+id).style.background='';
}

function scheck(el)
{
	var id=el.id;
	
	switch (id)	
	{
		case "where_all":
				if (el.checked)
				{
					document.getElementById('where_pdf').checked=false;
					document.getElementById('where_web').checked=false;
				}
				else
					if (!document.getElementById('where_pdf').checked)				
						document.getElementById('where_web').checked=true;
			break;
		case "where_pdf":
				if (el.checked)				
					document.getElementById('where_all').checked=false;
				else
					if (!document.getElementById('where_web').checked)
						document.getElementById('where_all').checked=true;
			break;
		case "where_web":
				if (el.checked)				
					document.getElementById('where_all').checked=false;
				else
					if (!document.getElementById('where_pdf').checked)
						document.getElementById('where_all').checked=true;
		
			break;	
	}
}

function checkPassword()
{
	var p = document.getElementById('password');
	var pc = document.getElementById('password_conf');
	
	if ((p.value.length==0 && pc.value.length==0) || p.value==pc.value)
	{
		document.getElementById('uform').submit();
		return true;
	}
	alert('Bad password confirm');
	return false;	
}

function xget(id) {
	if(document.getElementById) return document.getElementById(id);
	if(document.all) return document.all[id];
	return null;
}