// JavaScript Document
function _url(path)
{
	window.location = path;
}

function _obj(id)
{
	return document.getElementById(id);
}

function validate(form)
{
	if ((form.frm_login_username.value == "")||(form.frm_login_username.value == "username"))
	{
		alert("Enter username!");
		form.frm_login_username.focus();
		return false;
	} 
	else 
	{
		if ((form.frm_login_password.value == "")||(form.frm_login_password.value == "pass")) 
		{
			alert("Enter password!");
			form.frm_login_password.focus();
			return false;
		}
		else 
		{
			return true;
		}
	}
}

function update_nearest_distibutor(obj)
{
	if (obj.value != '--') { window.location = '?page='+obj.value; }
}

var nwind = '';
function enlarge(url)
{
	var w = 640+24;
	var h = 480+24;
	var t = Math.round((screen.height - h) /2);
	var l = Math.round((screen.width - w) /2);
	nwind = window.open('enlarge.php?pic='+escape(url),'enlarger','top='+t+',left='+l+',width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes');
	nwind.focus();
}

						
function show_more_detailes()
{
	if (_obj('more_details_cont')) 
	{
		_obj('more_details_cont').style.display = 'block'; 
		_obj('det_trigger').style.display = 'none'; 
	}
}
