function window_open(url_address,window_width,window_height,framename,additional,is_picture) 
{
  sx = (screen.availWidth - window_width) / 2;
  sy = (screen.availHeight - window_height) / 2;
  params = "width="+window_width+",height="+window_height+",Left="+sx+",Top="+sy+",screenX="+sx+",screenY="+sy;
  if(additional>"") params += "," + additional;
  nw = window.open(url_address, framename, params);
  
  if(nw) {
	nw.focus();
	return nw;
  }
}

function SetCity(cid,cname)
{
	document.getElementById('cityid').value = cid;
	document.getElementById('cityname').value = cname;
	
}

function openwindow(url_address,window_width,window_height,framename,additional,is_picture) {
  sx = (screen.availWidth - window_width) / 2;
  sy = (screen.availHeight - window_height) / 2;
  params = "width="+window_width+",height="+window_height+",Left="+sx+",Top="+sy+",screenX="+sx+",screenY="+sy;
  if(additional>"") params += "," + additional;
  if(is_picture==1) nw = window.open('', framename, params);
	else nw = window.open(url_address, framename, params);
  if(is_picture==1) {
    nw.document.open();
    nw.document.write("<html><head><title>Europe Hotel Guide - Photos</title></head>\n");
    nw.document.write("<body marginwidth='0' marginheight='0' topmargin='0' leftmargin='0'>\n");
    nw.document.write("<center><img src='"+url_address+"' alt='photo'></center>\n");
    nw.document.write("</body>\n");
    nw.document.write("</html>\n");
    nw.document.close();
  }else if(is_picture==2){
    nw.document.open();
    nw.document.write("<html><head><title></title></head>\n");
    nw.document.write("<body marginwidth='0' marginheight='0' topmargin='0' leftmargin='0'>\n");
    nw.document.write("<center>\n");
		nw.document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+window_width+"' height='"+window_height+"' align='middle'>\n");
		nw.document.write("<param name='allowScriptAccess' value='sameDomain' />\n");
		nw.document.write("<param name='movie' value='"+url_address+"' /><param name='quality' value='high' /><param name='bgcolor' value='#cccccc' /><embed src='"+url_address+"' quality='high' bgcolor='#cccccc' width='"+window_width+"' height='"+window_height+"' name='Xmas200300_de' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\n");
		nw.document.write("</object>\n");
		nw.document.write("</center>\n");
    nw.document.write("</body>\n");
    nw.document.write("</html>\n");
    nw.document.close();
	}
  if(nw) {
	nw.focus();
	return nw;
  }
}


