// Main JS

window.defaultStatus = "EXPO 2005";

var left_2 = 82;
var width_2 = 155;
var top_2 = new Array(3);
top_2[0] = -120;
top_2[1] = -80;
top_2[2] = -40;

function writeLine()	{

	h = document.getElementById('sub1').offsetHeight;
	if (is.ie || is.ns)	{ h = h  + 133 }
	else	{h = h + 153 };
	writeCSS('\#line {top: ' + h + 'px;}');
	document.write('<div id="line"></div>')
	
}
function popupwin(x,w,h,txt,alt) {
	winpopup = window.open('','popup','height='+h+', width='+w+',menubar=no,scrollbars=no,status=no,toolbar=no,screenX='+getCenterW(w)+',screenY='+getCenterH(h)+',top='+getCenterH(h)+',left='+getCenterW(w));
	winpopup.document.open();
	winpopup.document.write('<html>\n<head>\n');
	winpopup.document.write('<title>'+eval('txt')+'</title>');
	winpopup.document.write('</head>\n');
	winpopup.document.write('<body bgcolor="#FFFFFF" style="margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0;">\n');
	winpopup.document.write('	<img src="'+x+'" width="'+w+'" height="'+h+'" border="0" alt="'+alt+'"');
	winpopup.document.write('</body>\n</html>\n');
	winpopup.document.close();
}
function galWin(w,h,picNum,galDesc,galDir,galFName) {
	var title = 'EXPO 2005 Aichi Czech Republic';
	var winW = w + 35;
	var winH = h + 35;
	if (galDesc) winH = h + 100;
	winpopup = window.open('','popup','height='+winH+', width='+winW+',menubar=no,scrollbars=no,status=no,toolbar=no,screenX='+getCenterW(winW)+',screenY='+getCenterH(winH)+',top='+getCenterH(winH)+',left='+getCenterW(winW));
	winpopup.document.open();
	winpopup.document.write('<html>\n<head>\n');
	winpopup.document.write('	<meta name="Author" content="FG Forrest - Creative Technologies, www.fg.cz, fg@fg.cz, 1996-2004">\n');
	winpopup.document.write('	<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">\n');
	winpopup.document.write('	<title>' + title + '</title>\n');
	winpopup.document.write('	<style type="text/css">@import url("/css/u/main.css");</style>\n');
	winpopup.document.write('	<style type="text/css">@import url("/css/u/main_sect.css");</style>\n');
	winpopup.document.write('</head>\n');
	winpopup.document.write('<body>\n');
	winpopup.document.write('<div id="gallery">\n');
	winpopup.document.write('	<img src="/img/u/' + galDir + '/' + galFName + '_' + picNum + '.jpg" alt="" width="' + w + '" height="' + h + '" class="preview">\n');
	if (galDesc) winpopup.document.write('	<div class="desc" style="width: ' + eval(w+2) + 'px;">' + galDesc + '</div>\n');
	winpopup.document.write('</div>\n');
	winpopup.document.write('</body>\n</html>\n');
	winpopup.document.close(); 
}
function getCenterW(width) {
	return parseInt( eval( (screen.width-parseInt(width))/2 ) );
}

function getCenterH(height) {
	return parseInt( eval( (screen.height-parseInt(height))/2 ) );
}

function openPopUp(lang,width,height) {
		var path = '';
		(lang && (lang == 'en' || lang == 'jp')) ? path = '/'+lang+'/popup.shtml' : path = '/cs/popup.shtml';
		pWin=window.open(path,'PupUpWin','scrollbars=no,resizable=no,resize=no,width='+width+',height='+height+',screenX='+getCenterW(width)+',screenY='+getCenterH(height)+',top='+eval('getCenterH(height)-162;')+',left='+getCenterW(width));
		pWin.focus();
}
function help (lng) {
	openHardWin('_expowin', '/'+lng+'/search/help.shtml',635,480,'yes');
}
function openHardWin( name, path, width, height, scroll ) {
		if (!scroll || scroll != 'yes') { scroll = 'no' };
		var expowin = window.open(path,name,'scrollbars=' + scroll + ',resizable=no,resize=no,width='+width+',height='+height+',screenX='+getCenterW(width)+',screenY='+getCenterH(height)+',top='+getCenterH(height)+',left='+getCenterW(width)+',locationbar=no,directories=no,dependent=yes' );
		expowin.focus();
		return expowin;
}
