function mailTo(user, domain, tld) {
window.location = "mail"+"to"+":"+user+"%40"+domain+"%2e"+tld;
}

function redirect() {
	var objSelect ;
	var arrUrl ;
	
	arrUrl = new Array();
	objSelect = document.getElementById('KeySortDropDownList1') ;
	selected = objSelect.selectedIndex ;
	value = objSelect.options[selected].value ;
	
	arrUrl[0] = 'browse.php' ;
	arrUrl[1] = '2006.php' ;
	arrUrl[2] = '1986.php' ;
	arrUrl[3] = '#' ;
	arrUrl[4] = '#' ;

	window.location.href=arrUrl[value];


	
}


function showHide(aId,aId2) {
	
	var aId = document.getElementById(aId) ;
	var aId2 = document.getElementById(aId2) ;
	
	if (aId.style.display = 'block') { 
		aId.style.display = 'none' ;
		aId2.style.display = 'block' ;
		}
	else {	aId2.style.display = 'none' ;
		aId.style.display = 'block' ; }
	
}

// NEW //

function popup (imageURL, caption, LoseFocus) {
  var windowTop = 0;
  var windowLeft = 0;
  var defaultWidth = 800;
  var defaultHeight = 500;
  var scrollbars = 1;
  //var onLoseFocusExit = LoseFocus;
  var onLoseFocusExit = false;
  var undefined;
  var Options = "scrollbars=" + scrollbars + ",width=" + defaultWidth + ",height=" + defaultHeight + ",top=" + windowTop + ",left=" + windowLeft + ""
  var myScript = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n" +
    "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n" +
    "<head>\n" +
    "<title>" + caption + "\</title>\n" +
    "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n" +
    "<meta http-equiv=\"Content-Language\" content=\"en\">\n" +
    "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n" +
    "<script language=\"JavaScript\" type=\"text/javascript\">\n" +
    "function resizewindow () {\n" +
    "  var width = document.myimage.width;\n" +
    "  var height = document.myimage.height;\n";
  if (navigator.appName.indexOf("Netscape") != -1) {
	var width1 = document.imageAff.width ;
	var height1 = document.imageAff.height ;
	//alert(height1) ;
	//width1 = width1-150 ;
	//height1 = height1-95 ;
	//myScript = myScript + "  window.resizeTo ("+ width1 +"," + height1 + ");\n"
    //myScript = myScript +  "  window.innerHeight = height1;\n  window.innerWidth = width;\n"
	myScript = myScript + "  window.resizeTo (width+15, height+27);\n" ;
  }
  else if (navigator.appName.indexOf("Opera") != -1) {
    myScript = myScript +  "  window.resizeTo (width+12, height+31);\n"
  }
  else if (navigator.appName.indexOf("Microsoft") != -1) {
    myScript = myScript + "  window.resizeTo (width+30, height+41);\n"
  }
  else {
    myScript = myScript + "  window.resizeTo (width+14, height+34);\n"
  }
  myScript = myScript + "}\n" + "window.onload = resizewindow;\n" +
    "</script>\n</head>\n" + "<body ";
  if (onLoseFocusExit) {myScript = myScript + "onblur=\"window.close()\" onmousedown=\"window.close()\" ";}
  myScript = myScript + "style=\"margin: 0px; padding: 0px;\">\n" +
    "<img src=\"" + imageURL + "\" alt=\"" + caption + "\" title=\"" + caption + "\" name=\"myimage\">\n" +
    "</body>\n" +  "</html>\n";
  var imageWindow = window.open ("","imageWin",Options);
  imageWindow.document.write (myScript)
  imageWindow.document.close ();
  if (window.focus) imageWindow.focus();
  return false;
}

function resolution_browse() {
	
	var largeur;
	   var hauteur;
	   largeur = screen.width;
	   hauteur = screen.height;
	   //alert(largeur + ' ' + hauteur) ;
	if(largeur<1100) {
		document.body.style.padding = '20px 0px 0px 0px' ;
		document.getElementById('border_top').style.padding = '30px 0px 0px 0px' ;
		document.getElementById('top_footer').style.margin = '20px 0px 0px 0px' ;
		}
}

function resolution_works() {
	
	var largeur;
	   var hauteur;
	   largeur = screen.width;
	   hauteur = screen.height;
	   //alert(largeur + ' ' + hauteur) ;
	if(largeur<1100) {
		document.body.style.padding = '20px 0px 0px 0px' ;
		document.getElementById('border_top').style.padding = '40px 0px 0px 0px' ;
		document.getElementById('top_footer').style.margin = '20px 0px 0px 0px' ;
		}
	
}

function resolution_others() {
	
	var largeur;
	   var hauteur;
	   largeur = screen.width;
	   hauteur = screen.height;
	   //alert(largeur + ' ' + hauteur) ;
	if(largeur<1100) {
		document.body.style.padding = '20px 0px 0px 0px' ;
		document.getElementById('border_top').style.padding = '40px 0px 0px 0px' ;
	//	document.getElementById('top_footer').style.margin = '20px 0px 0px 0px' ;
		}
	
}
