// JavaScript Document

function OpenWindow(theURL,winName,features) { //v2.0
  var wopen;
  wopen = window.open(theURL,winName,features);
  wopen.focus();
}


function ViewImage( img, imgtxt){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img, imgtxt);
}

function Controlla(img, imgtxt){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img, imgtxt);
  }

  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }

}



function viewFoto(img, imgtxt){

  largh=foto1.width + 20;
  altez=foto1.height + 150;
  stringa="width="+largh+",height="+altez;
  mywin = window.open('',"",stringa);
  with ( mywin.document ){
  	open();
  	write ('<head><title>Online2Greece.com</title></head>');
	write ('<link href="online2greece_main.css" rel="stylesheet" type="text/css">');
	write ('<html><body leftmargin=1 topmargin=1 oncontextmenu=" return false;"><center>');
	write ('<table  width="98%" cellspacing=0  bgcolor="#F3FFFF" cellpadding=2 class="border">');
	write ('<tr><td height="50" align="center" valign="top" bgcolor="#DCF5FD"><table width="95%" height="50"  border="0" cellpadding="0" cellspacing="0">');
    write (' <tr><td width="25%" align="left" valign="middle"><img src="images/_fasa.gif" width="95" height="50"></td><td width="75%" align="right" valign="middle" class="headline">Photo Gallery</td>');
    write (' </tr></table></td><tr>');
	write ('<tr><td><img src="' + foto1.src +'"></td></tr>');
	write (' <tr><td align="left" valign="top">&nbsp;</td></tr>');	
//	write('<tr><td width="100%" align="center" >'+ imgtxt + '</td>');
	write('<tr><td width="100%" align="right"><a class="boldblue" href="javascript:;" onclick="window.close();">Close Window</a></td>');
	write('</tr></table>');
	write('</center></body></html>');
	close();
  }
 
}



 function DoCal(elTargetMonth, elTargetDay, elTargetYear, type ) {

  if (showModalDialog) {

    var sRtn;

	if ( type=="arrival" )

    	sRtn = showModalDialog("/calendar.htm","","center=yes;dialogWidth=220pt;dialogHeight=200pt");

	else

		sRtn = showModalDialog("/calendard.htm","","center=yes;dialogWidth=220pt;dialogHeight=200pt");			



    if (sRtn!=""){

	  var sDate = sRtn.split( "/" );

	  elTargetMonth.value = sDate[0];

	  elTargetDay.value = sDate[1];

	  elTargetYear.value = sDate[2];

	 }

    } else{

      alert("Internet Explorer 4.0 or later is required.");

    }

 }



function JumpUrl(targ,selObj,restore){ //v3.0

   if ( selObj.options[selObj.selectedIndex].value!='')

  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");

  if (restore) selObj.selectedIndex=0;

}



