﻿function show_hide_div(num){

var divv = document.getElementById('showhide'+num);
var link = document.getElementById('showhidetext'+num);
	
if(divv.style.display==''){
	divv.style.display='none';
	link.innerHTML=translate('Show Stories');
}
else{
	divv.style.display='';
	link.innerHTML=translate('Hide Stories');
}


}


function translate(s){

if(document.location.host.toLowerCase().substring(2, 0)=="fr"){
	if(s=='Hide Stories'){
		return 'Histoires Masquer';
	}
	return 'Histoires Montrent';
}
else if(document.location.host.toLowerCase().substring(2, 0)=="es"){
	if(s=='Hide Stories'){
		return 'Esconden Historias';
	}
	return 'Historias Muestran';
}
else if(document.location.host.toLowerCase().substring(2, 0)=="de"){
	if(s=='Hide Stories'){
		return 'Geschichten Verbergen';
	}
	return 'Geschichten Zeigen';
}
else if(document.location.host.toLowerCase().substring(2, 0)=="it"){
	if(s=='Hide Stories'){
		return 'Nascondono Storie';
	}
	return 'Mostra Storie';
}
else if(document.location.host.toLowerCase().substring(2, 0)=="de"){
	if(s=='Hide Stories'){
		return 'Geschichten Verbergen';
	}
	return 'Geschichten Zeigen';
}
else if(document.location.host.toLowerCase().substring(2, 0)=="br"){
	if(s=='Hide Stories'){
		return 'Esconder Histórias';
	}
	return 'Histórias Mostram';
}
else if(document.location.host.toLowerCase().substring(2, 0)=="ru"){
	if(s=='Hide Stories'){
		return 'скрыть истории';
	}
	return 'Показать новости';
}
else if(document.location.host.toLowerCase().substring(2, 0)=="id"){
	if(s=='Hide Stories'){
		return 'Menyembunyikan Cerita';
	}
	return 'Menunjukkan Cerita';
}
else{
	return s;
}

}

function goURL3(url){

document.location=url;

}
function goURL2(url){
var tl = (navigator.language) ? navigator.language : navigator.userLanguage; 
document.location=url+'_'+tl;

}

function goURL(url){
var tl = (navigator.language) ? navigator.language : navigator.userLanguage; 
document.location=url+'&tl='+tl;
}


function VidCenter(url,name,w,h){
window.open(url,name,"menubar=no,width="+w+",height="+h+",toolbar=no");
}



function bookmark(url, title){

	  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}




var popUpWin=0;
function popUp(URLStr)
{

  var width = 800;
  var height = 600;
  var left = (screen.width/2)-(width/2);
  var top = (screen.height/2)-(height/2);
	
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width='+width+', height='+height+', left='+left+', top='+top+', screenX='+left+', screenY='+top+'');
}

function share2(u,t,s){

	if(s=='fb'){
		document.location='http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t);
	}
		else if(s=='tw'){
			document.location='http://twitter.com/home?status='+encodeURIComponent(t+' '+u);
		}
				else if(s=='be'){
					document.location='http://www.bebo.com/c/share?Url='+encodeURIComponent(u)+'&Title='+encodeURIComponent(t);
				}
				else if(s=='my'){
					document.location='http://www.myspace.com/index.cfm?fuseaction=postto&u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t);
				}
				else if(s=='su'){
					document.location='http://www.stumbleupon.com/submit?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t);
				}
				else if(s=='di'){
					document.location='http://digg.com/submit?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t);
				}
				else if(s=='de'){
					document.location='http://del.icio.us/post?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t);
				}
				else if(s=='mu'){
					document.location='http://www.mutoview.com/apps/MyMuto?type=sendfile&doc=Login&source=frame&anylink='+encodeURIComponent(u)+'&title='+encodeURIComponent(t);
				}					
}
function share3(u,t,s){

	if(s=='fb'){
		window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t));
	}
		else if(s=='tw'){
			window.open('http://twitter.com/home?status='+encodeURIComponent(t+' '+u));
		}
				else if(s=='be'){
					window.open('http://www.bebo.com/c/share?Url='+encodeURIComponent(u)+'&Title='+encodeURIComponent(t));
				}
				else if(s=='my'){
					window.open('http://www.myspace.com/index.cfm?fuseaction=postto&u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t));
				}
				else if(s=='su'){
					window.open('http://www.stumbleupon.com/submit?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t));
				}
				else if(s=='di'){
					window.open('http://digg.com/submit?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t));
				}
				else if(s=='de'){
					window.open('http://del.icio.us/post?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t));
				}
				else if(s=='mu'){
					window.open('http://www.mutoview.com/apps/MyMuto?type=sendfile&doc=Login&source=frame&anylink='+encodeURIComponent(u)+'&title='+encodeURIComponent(t));
				}					
}
function share(u,t,s){

	if(s=='fb'){
		window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t));
	}
		else if(s=='tw'){
			window.open('http://twitter.com/home?status='+encodeURIComponent(t+' '+u));
		}
				else if(s=='be'){
					window.open('http://www.bebo.com/c/share?Url='+encodeURIComponent(u)+'&Title='+encodeURIComponent(t));
				}
				else if(s=='my'){
					window.open('http://www.myspace.com/index.cfm?fuseaction=postto&u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t));
				}
				else if(s=='su'){
					window.open('http://www.stumbleupon.com/submit?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t));
				}
				else if(s=='di'){
					window.open('http://digg.com/submit?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t));
				}
				else if(s=='de'){
					window.open('http://del.icio.us/post?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t));
				}
				else if(s=='mu'){
					window.open('http://www.mutoview.com/apps/MyMuto?type=sendfile&doc=Login&source=frame&anylink='+encodeURIComponent(u)+'&title='+encodeURIComponent(t));
				}					
}











