//Do Not Edit Below
var number_of_videos = 0;

var vidformat;
var vidtitle;

function videoclick(format,title)
{
  vidformat = format;
  vidtitle = title;
}

function videopage(video,width,height)
{
  document.open();
  document.clear();
  document.write('<?php'); 
  document.write('/* Include Files *********************/');
  document.write('session_start();');
  document.write('include("login/database.php");');
  document.write('include("login/login.php");');
  document.write('/*************************************/');
  document.write('?>');
  document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">');
  document.write('<html>');
  document.write('<head>');
  document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
  document.write('<title>Hurricane Warning!</title>');
  document.write('</head>');
  document.write('<script language="javascript" src="layout.js"></script>');
  document.write('<?php displayLogin(); ?>');
  document.write('<script language="javascript" src="layout2.js"></script>');
  document.write('<script language="javascript" src="videos2.js"></script>');
  document.write('<td valign="top" align="left" style="padding-left: 20px; padding-right: 20px;">');
  document.write('<div align="center">');
  document.write('<div class="maincontentvid">');
  document.write('<table cellpadding="0" cellspacing="0" border="0" class="mainitems" width="100%">');
  document.write('<tr><td height="10"></td></tr>');
  document.write('<tr>');
  document.write('<td rowspan="999" valign="top" style="padding-top:27px;" >');
  document.write('<div class="vidtext" style="padding-top: 10px; padding-bottom: 20px;" align="center">');

  if (vidformat == 'vimeo')
  {
    var vidcode = '<object width="' + width + '" height="' + height + '"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=' + video + '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;autoplay=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=' + video + '&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;autoplay=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="' + width + '" height="' + height + '"></embed></object>';
  }

  if (vidformat == 'youtube')
  {
    var vidcode = '<object width="' + width + '" height="' + height + '"><param name="movie" value="' + video + '"></param><param name="wmode" value="transparent"></param><embed src="' + video + '" type="application/x-shockwave-flash" wmode="transparent" width="' + width + '" height="' + height + '"></embed></object><br>';
  }
  
  if (vidformat == 'flv')
  {
    var vidcode = '<embed src="player.swf" width="' + width + '" height="' + height + '" allowscriptaccess="always" allowfullscreen="true" flashvars="height=' + height + '&width=' + width + '&file=videos/' + video + '&searchbar=false&autostart=true"/><br>';
  }
  
  if (vidformat == 'other_site')
  {
    var vidcode = '<div align="center"><div align="center" style="width: ' + width + 'px; height: ' + height + 'px; border: 1px solid #ffffff;"><table cellpadding="0" cellspacing="0" border="0" width="100% height="100%"><tr><td width="' + width + '" height="' + height + '" align="center" valign="middle"><a href="' + video + '" target="_blank" class="vidtextfont" style="font-size: 14pt;">Click here to open this video<br><div style="font-size: 12pt;">(video will open in a new window)</div></a></td></tr></table></div></div>';
//    var vidcode = '<script language="javascript">window.open(\'' + video + '\')";</script>';
//    var vidcode = '<iframe src ="' + video + '" width="320"></iframe>';
  }
  document.write(vidcode);
  document.write('<br><br>');
  document.write('<div align="center" style="width:100%;">' + vidtitle + '</div>');
  document.write('</td>');
  document.write('<td rowspan="999" width="20"></td>');
  document.write('<td class="head1" colspan="2"><div style="float:left;">All HW Videos</div><div style="float:right;" class="viewall"><a href="index.html" class="vidtextfont">Back</a></div></td>');
  document.write('</tr>');

for (bb = 0; bb < vidcount; bb++)
{
document.write('<tr><td height=10></td></tr>');
document.write('<tr><td class=\'vidlink\'><a href=\"javascript: videopage(' + listnum[bb] + ',320,240);\" onclick=\"javascript: videoclick(\'vimeo\',\'' + listtitle[bb] + '\');\"><img src=\'' + listimage[bb] + '\' width=95 height=67 border=0></a></td><td class=\'vidtext\'><a href=\"javascript: videopage(' + listnum[bb] + ',320,240);\" onclick=\"javascript: videoclick(\'vimeo\',\'' + listtitle[bb] + '\');\" class=\"vidtextfont\">' + listtitle[bb] + '</a></td></tr>');

}
  document.write('</table>');
  document.write('<table cellpadding="0" cellspacing="0" border="0">');
  document.write('<tr><td colspan="5" class="head1" style="padding-top:10px;"><a href="index.html" class="vidtextfont">Go Back</a></td></tr>');
  document.write('</tr>');
  document.write('</table>');
  document.write('</div>');
  document.write('</div>');

  document.write('<script language="javascript" src="layoutend.js"></script>');
  document.write('</html>');
  document.close();
}
