tabsAmount = 3;
function tabSelect(id){
	tab = document.getElementById('tab'+id);
	tabCont = document.getElementById('tabCont'+id);
	for(var index=1; index<=tabsAmount; index++) {
		ctab = document.getElementById('tab'+index);
		ctab.className = 'tab';
		ctabCont = document.getElementById('tabCont'+index);
		ctabCont.className = 'hide';
	}
	tab.className = 'selectedTab';
	tabCont.className = 'show';
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
  return this.obj;
}

function reportPhoto(pic){
    f=getObj('form3');
    f.action=f.action+'flag.php?flag=1&pic='+pic;
    f.submit();
}

function loadcity(default_city){
    country=$("#country").val();
    if(country==0 || country=='0' || country=='')return false;
    if(typeof(default_city)!='undefined')default_city=default_city;
    else default_city=''
    $("#city_id").remove();
    $.post('/get_cities.php', {'default_city':default_city,'getcitiesof':country}, function(data){
        if(data.indexOf('city_id')>0)$("#city").hide();
        else $("#city").show();
        $("#citytd").html(data+$("#citytd").html());
    });
}




function citycheck(code){

            //$("#city_id").remove();
          if($("#city_id").val()=='')$("#city").show();
        else $("#city").hide();
}

