function nav (url) {document.location=url;}
function dn () {}
function getElementById (id) { return document.getElementById (id); }
function set_display (id, val) {getElementById (id).style.display=val;}
function getvis (id) { return getElementById (id).style.display!='none'; }
function hide (id) { set_display (id, 'none'); }
function sb (id) { set_display (id, 'block'); }
function si (id) { set_display (id, 'inline'); }

function chvis (id) {
  if (getvis (id))
    hide (id); else
	sb (id);
}

function getDomain ()
{
  var url= new String (document.location);
	url=url.replace (/(http:\/\/)/gi, '').replace (/\/.+/gi, '');
	return url;
}

function viewBigPhoto (image, width, height, alt) {
  var domain=getDomain ();
  var params='scrollbars=0,fullscreen=0,status=0,toolbar=0,width='+width+'px,height='+height+'px,resizable=0';
  var window=open ('', '2', params);
  var s_sheet_def = window.document.createElement("link");
  var s_sheet_con = window.document.createElement("link");
  s_sheet_def.setAttribute ('rel','stylesheet');
  s_sheet_def.setAttribute ('type','text/css');
  s_sheet_def.setAttribute ('href','http://'+domain+'/styles/default.css');
  s_sheet_con.setAttribute ('rel','stylesheet');
  s_sheet_con.setAttribute ('type','text/css');
  s_sheet_con.setAttribute ('href','http://'+domain+'/styles/content.css');
  var head=window.document.getElementsByTagName('HEAD');
  head[0].appendChild (s_sheet_def);
  head[0].appendChild (s_sheet_con);
  var body=window.document.getElementsByTagName('BODY');
  body[0].id='content';
	window.document.title=alt;
  window.document.body.innerHTML='<div onclick="window.close ()">'+
	'<table cellspacing="4"><tr><td><img style="margin: 0;" src="'+image+'" alt="'+alt+'" title="'+alt+'"></td></tr>'+
	'<tr><td align="center">'+alt+'</td></tr>'
	'</div>';
}

