// Send page URL by email
function SendLink(){
	var url=location.href;
	var title=document.title;
	var email=prompt("Enter a friend's email address to send link to page: \n"+title,"");
	if (email != null && email.indexOf("@") > -1) {
		target='mailto:'+email+'?subject=Sending link to: '+title+'&body=Check out this article at DivXLand.org: '+url;
		parent.location.href=target;
	}
}
// Bookmark page
function SaveLink(surl){
	if(surl.indexOf("file:") > -1) surl="home"; // IE cannot bookmark pages saved on hd: use main URL
	if(surl=="home") surl="http://www.divxland.org"; else surl=location.href;
	var ptitle=document.title;
	if(window.external) {                           // add IE favorite
		external.AddFavorite(surl,ptitle);
	} else if(window.sidebar && sidebar.addPanel) { // add to FF bookmarks
		sidebar.addPanel(ptitle,surl,'');
	} else {                                        // unknown browser: report user
		alert('Failed to recognize your browser, please bookmark the page manually.');
	}
}
// Print page
function PrintPage(){
	window.print()
}
var downon="";
var downoff="";
var goon="";
var gooff="";
// Preload down buttons
function PreLoad(){
	downon=new Image(118,26);
	downon.src="common/img/down_on.gif";
	downoff=new Image(118,26);
	downoff.src="common/img/down_off.gif";
	goon=new Image(16,16);
	goon.src="common/img/icogo.gif";
	gooff=new Image(16,16);
	gooff.src="common/img/icogo_off.gif";
}
// Generate custom popup window
function NewWindow(mypage,myname,w,h,scroll,resize){
	var win=null;
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable='+resize+'';
	win=window.open(mypage,myname,settings);
}
// Set status bar message to current page's title
function SetStatus(){
	var nstat="You are at: "+document.title;
	window.defaultStatus=nstat;
}
// Load top iframe content
function ShowIframeAds(){
	document.getElementById('menupic').width=0;
	document.getElementById('menupic').height=0;
	document.getElementById('mladftr').src="http://smartad.mercadolibre.com.ar/jm/SmartAd?tool=2105943&creativity=8201&new=Y&ovr=N&bgcol=FFFFFF&brdcol=000000&txtcol=006600&lnkcol=0000FF&hvrcol=FF0000&prccol=FF0000&word=mp3&word=usb&word=divx&site=MLA";
}
// Mostrar leyenda sobre la version en espanol de esta pagina
/*
function CheckPLang(){
	var showt=0;
	var spurl=document.URL;
	spurl=spurl.replace(".org/",".org/esp/");
	if (navigator.appName=="Netscape" && navigator.language.indexOf("es-")>-1) showt=1;
	if (navigator.appName.indexOf("Internet Explorer")>0 && navigator.userLanguage.indexOf("es-")>-1) showt=1;
	if (showt==1 && document.URL.indexOf("babelfish")>0) showt=0; //no poner en pags traducidas
	if (showt==1 && document.URL.indexOf("ttd")<1){
		document.write("<p style='margin-top: 0; margin-bottom: 0' align='center'>&nbsp;</p>\n");
		document.write("<center>\n<table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' bgcolor='#FFFFCC'>\n");
  		document.write("  <tr>\n    <td width='100%'>\n");
    	document.write("    <p style='margin: 4 6'><font face='Tahoma' size='2'>\n");
    	document.write("    <img border='0' src='common/menu/spain.gif' align='absbottom' width='16' height='16'>&nbsp; \n");
    	document.write("    Para ver la versión en español de ésta página, haga click\n");
    	document.write("    <a href='"+spurl+"'>aquí</a>.</font></td>\n");
  		document.write("  </tr>\n</table>\n</center>\n");
	}
}
*/
