function flash(num) {
   
      document.write("<object type='application/x-shockwave-flash' data='banner"+num+".swf' width='821' height='359' menu='no' id='banner"+num+"'>\n");
      document.write("<param name='movie' value='banner"+num+".swf' />\n");
      document.write("<param name='width' value='821' />\n");
	  document.write("<param name='height' value='359' />\n");
	  document.write("<param name='quality' value='high' /><param name='menu' value='0'><param name='wmode' value='transparent' />\n");
      document.write("</object>\n");
}
function flashgal() {
	document.write("<object type='application/x-shockwave-flash' data='gallery.swf' width='821' height='422' menu='no' id='gallery'>\n");
	document.write("<param name='movie' value='gallery.swf' />\n");
	document.write("<param name='width' value='821' />\n");
	document.write("<param name='height' value='422' />\n");
	document.write("<param name='quality' value='high' /><param name='menu' value='0'><param name='wmode' value='transparent' />\n");
	document.write("</object>\n");
}

function showPhotoN(which,num,w,h,commento)
{	
  
  var x = (screen.width - (w+45)) / 2;
  
   if (commento == "")
  {var y = (screen.height - (h+44)) / 2;}
else
  {var y = (screen.height - (h+49)) / 2;}
	
  var html = "";
 // var imgsrc = "./images/common/photos/" + which + ".jpg";
 
  if (commento == "")
{ var winFeatures = "width=" + (w+45) + ",height=" + (h+44) + ",left="+ x + ",top=" + y;}
 else
{ var winFeatures = "width=" + (w+45) + ",height=" + (h+49) + ",left="+ x + ",top=" + y;}

  //alert(winFeatures);
  
  html = html + "<html>\r\n<head>\r\n  <title>Weddings at Villa San Crispolto - Photo Gallery</title>\r\n";
  html = html + "<link href='base.css' rel='stylesheet' type='text/css'>\r\n";
  html = html + "</head>\r\n<body>\r\n";
//  html = html + "<p align='center'><table border='0' width='" + w + "'><tr><td width='50%'align='left'>"+ caption + "</td><td width='50%'align='right'><a href='javascript:self.close();'>Close</a></td></tr></table>\r\n"; 
  html = html + "<div align=center><table border='0' width='" + w + "'><tr><td width='50%'align='left'>&nbsp;" + "</td><td width='50%'align='right'><a href='javascript:self.close();void(0);'>Close</a></td></tr></table>\r\n"; 
  html = html + "<img  align=middle src='photogallery/photo" + which + "." + num + "' width='" + w + "' height='" + h + "' class='tst'>\r\n</body>\r\n</html>\r\n";
  
  if (commento != "")
  {
  html = html + "<table border='0' width='" + w + "'><tr><td width='90%'align='left'><b> - " + commento + "</b></td></tr></table>\r\n"; 
  }
  
  popWindow = open("","photospopup",winFeatures);
  popWindow.document.open();
  popWindow.document.writeln(html);
  popWindow.document.close();
  //popWindow.opener = self;
  popWindow.focus();

}

function zoom(pagina, w, h){
	var left=(screen.width - w)/2;
	var top=(screen.height- h)/2
	miaFin=window.open(pagina, "info", "width=" + w + ",height=" + h + ", left="+left+", top="+top+", directories=no, location=no, menubar=no, resizable=no, status=no, toolbar=no, scrollbars=no");
	miaFin.focus();
}


function blinkIt() {
 if (!document.all) return;
 else {
   for(i=0;i<document.all.tags('blink').length;i++){
      s=document.all.tags('blink')[i];
      s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';
   }
 }
}
 
setInterval('blinkIt()',800);
