function makeUrl(link)
{
    var url="index.php?menu=show_all_events";
    var country=getInnerHTMLById('countryName');
    var state=getInnerHTMLById('stateName');
    var city=getInnerHTMLById('cityName');
    if(country=='')
    {
            alert('Choose one country first.');
            return false;
    }
    else
    {
        switch(link){
        case 'todays_events':
                url+='&cmd=todays_events';
                break;
        case 'tomorrows_events':
                url+='&cmd=tomorrows_events';
                break;
        case 'next_7_days_events':
                url+='&cmd=next_7_days_events';
                break;
        case 'next_30_days_events':
                url+='&cmd=next_30_days_events';
                break;
        }
        if(country !='')
        url+='&country='+country;
        if(state !='')
        url+='&state='+state;
        if(city !='')
        url+='&city='+city;
        window.location=url;
    }
}

function validate_location(me)
{
    if(me.locations.value=='' || me.locations.value=='City, Neighborhood or Zip')
        return false;
    else
        return true;
}

function Fema_Url(link)
{
    var url="index.php?menu=show_all_fema_live";
    var city=getInnerHTMLById('cityName');
    var state=getInnerHTMLById('stateName');
    var country=getInnerHTMLById('countryName');
    if(country !='')
    url+='&country='+country;
    if(state !='')
    url+='&state='+state;
    if(city !='')
    url+='&city='+city;
    getById(link.id).href=url;
}





/*function makeUrl(link)
{
        var url="index.php?menu=show_all_events";
        var country=getInnerHTMLById('countryName');
        var state=getInnerHTMLById('stateName');
        var city=getInnerHTMLById('cityName');
        var pri_id=getById('pri_category').getAttribute('onclick');
        var temp_pri_id=pri_id.split('\'');
        pri_id=temp_pri_id[1];
        var pri_cat=getInnerHTMLById('pri_category');
        pri_cat= pri_cat.replace('&amp;','%26');
        
        var id=getById('sec_category').getAttribute('onclick');
        var temp_id=id.split('\'');
        id=temp_id[1];
        var sec_cat=getInnerHTMLById('sec_category');
        sec_cat= sec_cat.replace('&amp;','%26');
        alert(sec_cat);
        temp=pri_cat.split('; ');
        pri_cat=temp[1];
        temp=sec_cat.split('; ');
        sec_cat=temp[1];
        
        if(country=='')
        {
                alert('Choose one country first.');
                return false;
        }
        else
        {
        switch(link){
                case 'todays_events':
                        if(sec_cat!=null)
                                url+='&cmd=secondary&range=today&pri_id='+pri_id+'&pri_category='+pri_cat+'&id='+id+'&name='+sec_cat;
                        else
                                url+='&cmd=todays_events';
                        break;
                case 'tomorrows_events':
                                url+='&cmd=tomorrows_events';
                        break;
                case 'next_7_days_events':
                                url+='&cmd=next_7_days_events';
                        break;
                case 'next_30_days_events':
                                url+='&cmd=next_30_days_events';
                        break;
                }
                if(country !='')
                url+='&country='+country;
                if(state !='')
                url+='&state='+state;
                if(city !='')
                url+='&city='+city;
        window.location=url;
        }
}*/		
