// JavaScript Document

function mouseover_color(id){

document.getElementById(id).style.backgroundColor="#319c00";

	}
	
function mouseout_color(id){

document.getElementById(id).style.backgroundColor="";
	}	
	
//worldnavi	
function worldnavi(){
var list_t="";
var asia_len=asia_country_name.length;
var oceania_len=oceania_country_name.length;
var north_america_len=north_america_country_name.length;
var europe_len=europe_country_name.length;

var al=asia_len;
var ol=oceania_len;
var nl=north_america_len;
var el=europe_len;

var now_title="";
if(document.getElementById("country_tt")){   
	now_title=document.getElementById("country_tt").innerHTML;
  }   
  else{   
  }

list_t=list_t+"<ul>";
/* asia*/
list_t=list_t+"<li class=\"region\">"+region_name[0]+"</li>";
var an=0;
for (i=1;i<=al;i++){
  if (asia_country_link[an]!=""){
		  if(asia_country_name[an]!=now_title){
			 
			  list_t=list_t+"<li id=\""+asia_country_id[an]+"\" onmouseover=\"mouseover_color(this.id)\" onmouseout=\"mouseout_color(this.id)\"><a href=\""+asia_country_link[an]+"\">"+asia_country_name[an]+"</a></li>";
			  an=an+1;
			  
			  }else{
			 
			  list_t=list_t+"<li id=\""+asia_country_id[an]+"\" class=\"access\">"+asia_country_name[an]+"</li>";
			  an=an+1;
			  
				  }
  }else{
			 
			  list_t=list_t+"<li id=\""+asia_country_id[an]+"\" onmouseover=\"mouseover_color(this.id)\" onmouseout=\"mouseout_color(this.id)\">"+asia_country_name[an]+"</li>";
			  an=an+1;
			  
     }
}
/* oceania*/
list_t=list_t+"<li class=\"region\">"+region_name[1]+"</li>";
var on=0;
for (i=1;i<=ol;i++){
  if (oceania_country_link[on]!=""){
		  if(oceania_country_name[on]!=now_title){
			 
			  list_t=list_t+"<li id=\""+oceania_country_id[on]+"\" onmouseover=\"mouseover_color(this.id)\" onmouseout=\"mouseout_color(this.id)\"><a href=\""+oceania_country_link[on]+"\">"+oceania_country_name[on]+"</a></li>";
			  on=on+1;
			  
			  }else{
			 
			  list_t=list_t+"<li id=\""+oceania_country_id[on]+"\" class=\"access\">"+oceania_country_name[on]+"</li>";
			  on=on+1;
			  
				  }
  }else{
			 
			  list_t=list_t+"<li id=\""+oceania_country_id[on]+"\" onmouseover=\"mouseover_color(this.id)\" onmouseout=\"mouseout_color(this.id)\">"+oceania_country_name[on]+"</li>";
			  on=on+1;
			  
     }
}
/* north_america*/
list_t=list_t+"<li class=\"region\">"+region_name[2]+"</li>";
var nn=0;
for (i=1;i<=nl;i++){
  if (north_america_country_link[nn]!=""){
		  if(north_america_country_name[nn]!=now_title){
			 
			  list_t=list_t+"<li id=\""+north_america_country_id[nn]+"\" onmouseover=\"mouseover_color(this.id)\" onmouseout=\"mouseout_color(this.id)\"><a href=\""+north_america_country_link[nn]+"\">"+north_america_country_name[nn]+"</a></li>";
			  nn=nn+1;
			  
			  }else{
			 
			  list_t=list_t+"<li id=\""+north_america_country_id[nn]+"\" class=\"access\">"+north_america_country_name[nn]+"</li>";
			  nn=nn+1;
			  
				  }
  }else{
			 
			  list_t=list_t+"<li id=\""+north_america_country_id[nn]+"\" onmouseover=\"mouseover_color(this.id)\" onmouseout=\"mouseout_color(this.id)\">"+north_america_country_name[nn]+"</li>";
			  nn=nn+1;
			  
     }
}
/* europe*/
list_t=list_t+"<li class=\"region\">"+region_name[3]+"</li>";
var en=0;
for (i=1;i<=el;i++){
  if (europe_country_link[en]!=""){
		  if(europe_country_name[en]!=now_title){
			 
			  list_t=list_t+"<li id=\""+europe_country_id[en]+"\" onmouseover=\"mouseover_color(this.id)\" onmouseout=\"mouseout_color(this.id)\"><a href=\""+europe_country_link[en]+"\">"+europe_country_name[en]+"</a></li>";
			  en=en+1;
			  
			  }else{
			 
			  list_t=list_t+"<li id=\""+europe_country_id[en]+"\" class=\"access\">"+europe_country_name[en]+"</li>";
			  en=en+1;
			  
				  }
  }else{
			 
			  list_t=list_t+"<li id=\""+europe_country_id[en]+"\" onmouseover=\"mouseover_color(this.id)\" onmouseout=\"mouseout_color(this.id)\">"+europe_country_name[en]+"</li>";
			  en=en+1;
			  
     }
}


list_t=list_t+"</ul>";

document.getElementById("globalnav").innerHTML=list_t;
	
	}


//asianavi
function asianavi(){
var list_t="";
var asia_len=asia_country_name.length;
var al=asia_len;

var now_title="";
if(document.getElementById("country_tt")){   
	now_title=document.getElementById("country_tt").innerHTML;
  }   
  else{   
  }

list_t=list_t+"<span class=\"glov_tt\">"+region_name_shot[0]+"</span>"+"<ul class=\"glov_flag\">";

var an=0;
for (i=1;i<=al;i++){

    shot_name=asia_country_name[an];
	de_p=shot_name.indexOf("µÄ");
	shot_name=shot_name.substr(0,de_p);
	l=shot_name.length;
	if (l == 4){
		shot_name = shot_name.substr(0,2)+"<br />"+shot_name.substr(2,2)	
		}


 if (asia_country_link[an]!=""){
		  if(asia_country_name[an]!=now_title){
			 
			  list_t=list_t+"<li><a href=\""+asia_country_link[an]+"\"><img src=\""+asia_country_img[an]+"\" alt=\""+asia_country_name[an]+"\" title=\""+asia_country_name[an]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</a></li>";
			  an=an+1;

           }else{
			 
			  list_t=list_t+"<li class=\"access\">"+"<img src=\""+asia_country_img[an]+"\" alt=\""+asia_country_name[an]+"\" title=\""+asia_country_name[an]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</li>";
			  an=an+1;
			  
				  }
  }else{
			 
			  list_t=list_t+"<li>"+"<img src=\""+asia_country_img[an]+"\" alt=\""+asia_country_name[an]+"\" title=\""+asia_country_name[an]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</li>";
			  an=an+1;
			  
     }
}

list_t=list_t+"</ul>";
document.getElementById("glov_country").innerHTML=list_t;
}

//europenavi
function europe_navi(){
var list_t="";
var europe_len=europe_country_name.length;
var el=europe_len;

var now_title="";
if(document.getElementById("country_tt")){   
	now_title=document.getElementById("country_tt").innerHTML;
  }   
  else{   
  }

list_t=list_t+"<span class=\"glov_tt\">"+region_name_shot[3]+"</span>"+"<ul class=\"glov_flag\">";

var en=0;
for (i=1;i<=el;i++){

    shot_name=europe_country_name[en];
	de_p=shot_name.indexOf("µÄ");
	shot_name=shot_name.substr(0,de_p);
	l=shot_name.length;
	if (l == 4){
		shot_name = shot_name.substr(0,2)+"<br />"+shot_name.substr(2,2)	
		}


 if (europe_country_link[en]!=""){
		  if(europe_country_name[en]!=now_title){
			 
			  list_t=list_t+"<li><a href=\""+europe_country_link[en]+"\"><img src=\""+europe_country_img[en]+"\" alt=\""+europe_country_name[en]+"\" title=\""+europe_country_name[en]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</a></li>";
			  en=en+1;

           }else{
			 
			  list_t=list_t+"<li class=\"access\">"+"<img src=\""+europe_country_img[en]+"\" alt=\""+europe_country_name[en]+"\" title=\""+europe_country_name[en]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</li>";
			  en=en+1;
			  
				  }
  }else{
			 
			  list_t=list_t+"<li>"+"<img src=\""+europe_country_img[en]+"\" alt=\""+europe_country_name[en]+"\" title=\""+europe_country_name[en]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</li>";
			  en=en+1;
			  
     }
}

list_t=list_t+"</ul>";
document.getElementById("glov_country").innerHTML=list_t;
}

//oceanianavi
function oceania_navi(){
var list_t="";
var oceania_len=oceania_country_name.length;
var ol=oceania_len;

var now_title="";
if(document.getElementById("country_tt")){   
	now_title=document.getElementById("country_tt").innerHTML;
  }   
  else{   
  }

list_t=list_t+"<span class=\"glov_tt\">"+region_name_shot[1]+"</span>"+"<ul class=\"glov_flag\">";

var on=0;
for (i=1;i<=ol;i++){

    shot_name=oceania_country_name[on];
	de_p=shot_name.indexOf("µÄ");
	shot_name=shot_name.substr(0,de_p);
	l=shot_name.length;
	if (l == 4){
		shot_name = shot_name.substr(0,2)+"<br />"+shot_name.substr(2,2)	
		}


 if (oceania_country_link[on]!=""){
		  if(oceania_country_name[on]!=now_title){
			 
			  list_t=list_t+"<li><a href=\""+oceania_country_link[on]+"\"><img src=\""+oceania_country_img[on]+"\" alt=\""+oceania_country_name[on]+"\" title=\""+oceania_country_name[on]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</a></li>";
			  on=on+1;

           }else{
			 
			  list_t=list_t+"<li class=\"access\">"+"<img src=\""+oceania_country_img[on]+"\" alt=\""+oceania_country_name[on]+"\" title=\""+oceania_country_name[on]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</li>";
			  on=on+1;
			  
				  }
  }else{
			 
			  list_t=list_t+"<li>"+"<img src=\""+oceania_country_img[on]+"\" alt=\""+oceania_country_name[on]+"\" title=\""+oceania_country_name[on]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</li>";
			  on=on+1;
			  
     }
}

list_t=list_t+"</ul>";
document.getElementById("glov_country").innerHTML=list_t;
}

//north_americanavi
function north_america_navi(){
var list_t="";
var north_america_len=north_america_country_name.length;
var nl=north_america_len;

var now_title="";
if(document.getElementById("country_tt")){   
	now_title=document.getElementById("country_tt").innerHTML;
  }   
  else{   
  }

list_t=list_t+"<span class=\"glov_tt\">"+region_name_shot[2]+"</span>"+"<ul class=\"glov_flag\">";

var nn=0;
for (i=1;i<=nl;i++){

    shot_name=north_america_country_name[nn];
	de_p=shot_name.indexOf("µÄ");
	shot_name=shot_name.substr(0,de_p);
	l=shot_name.length;
	if (l == 4){
		shot_name = shot_name.substr(0,2)+"<br />"+shot_name.substr(2,2)	
		}


 if (north_america_country_link[nn]!=""){
		  if(north_america_country_name[nn]!=now_title){
			 
			  list_t=list_t+"<li><a href=\""+north_america_country_link[nn]+"\"><img src=\""+north_america_country_img[nn]+"\" alt=\""+north_america_country_name[nn]+"\" title=\""+north_america_country_name[nn]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</a></li>";
			  nn=nn+1;

           }else{
			 
			  list_t=list_t+"<li class=\"access\">"+"<img src=\""+north_america_country_img[nn]+"\" alt=\""+north_america_country_name[nn]+"\" title=\""+north_america_country_name[nn]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</li>";
			  nn=nn+1;
			  
				  }
  }else{
			 
			  list_t=list_t+"<li>"+"<img src=\""+north_america_country_img[nn]+"\" alt=\""+north_america_country_name[nn]+"\" title=\""+north_america_country_name[nn]+"\"  width=\"40\" height=\"28\" border=\"0\" align=\"top\" /><br />"+shot_name+"</li>";
			  nn=nn+1;
			  
     }
}

list_t=list_t+"</ul>";
document.getElementById("glov_country").innerHTML=list_t;
}

