function onResultsRowClick(target){
	document.location = target;
}

function showHideLoginArea(){
	if(document.getElementById('userTypeReturning').checked){
		document.getElementById('userTypeReturningDiv').style.display = '';
		document.getElementById('userTypeNewDiv').style.display = 'none';
	}else{
		document.getElementById('userTypeReturningDiv').style.display = 'none';
		document.getElementById('userTypeNewDiv').style.display = '';
	}
}

function showhideJobCat(id){
	showhide(id);
	if(document.getElementById(id).style.display=='none') {
		document.getElementById(id+'_heading').className = "jobCatTitle_closed";
	}else{
		document.getElementById(id+'_heading').className = "jobCatTitle_open";
	}
}

function htmlentities (string, quote_style) {
    var hash_map = {}, symbol = '', tmp_str = '', entity = '';
    tmp_str = string.toString();    
    if (false === (hash_map = this.get_html_translation_table('HTML_ENTITIES', quote_style))) {
        return false;
    }
    hash_map["'"] = '&#039;';    for (symbol in hash_map) {
        entity = hash_map[symbol];
        tmp_str = tmp_str.split(symbol).join(entity);
    }
        return tmp_str;
}

function confirmdelproject(id, serverpath)
{
	if(confirm("Are you sure to delete this project and all data related to it?"))
	{
		window.location = serverpath+'manage_accounts.php?pdelid='+id;
		return true;
	}
	return false;
}


function confirmActivateProject(id, serverpath, publishcost)
{
	if(confirm("Are you sure to activate this project?"))
	{
		window.location = serverpath+'manage_accounts.php?activateproject_id='+id;
		return true;
	}
	return false;
}


function confirm_close_project(id, serverpath)
{
	if(confirm("Are you sure to close this project?"))
	{
		window.location = serverpath+'manage_accounts.php?close_delid='+id;
		return true;
	}
	return false;
}
