// JavaScript Document for updated 01-20-07
/////////////////////
var email = "<a href='mailto:Bryan@DenProductions.com'>Bryan@DenProductions.com</a>";
var copyright = "<a href='http://denproductions.com' target='_blank'>Copyright © 2000-2012 Den Productions. All rights reserved.</a>";
/////////////////////
// Get and display todays date
/////////////////////
function getTodaysDate()
{   
	now = new Date();
	theMonth = now.getMonth() + 1;
	theDate = now.getDate();
	theYear = now.getFullYear();
	theDay = now.getDay();
 var text = '';
 
 if (theMonth == 1)   theMonth = "Janurary";
 if (theMonth == 2)   theMonth = "Febuary";
 if (theMonth == 3)   theMonth = "March";
 if (theMonth == 4)   theMonth = "April";
 if (theMonth == 5)   theMonth = "May";
 if (theMonth == 6)   theMonth = "June";
 if (theMonth == 7)   theMonth = "July";
 if (theMonth == 8)   theMonth = "August";
 if (theMonth == 9)   theMonth = "September";
 if (theMonth == 10)   theMonth = "October";
 if (theMonth == 11)   theMonth = "November";
 if (theMonth == 12)   theMonth = "December";
   
 text += theMonth + " ";
 text += theDate + ", ";
 text += theYear;
 
 return (text);

}
/////////////////////
// modified open window function
/////////////////////
function makeWin2b(url, p_Width, p_Height, p_WImage)
 {
  agent = navigator.userAgent;
  windowName = "Preview";
  params  = "";
  params += "toolbar=0,";
  params += "location=0,";
  params += "directories=0,";
  params += "status=0,";
  params += "menubar=0,";
  params += "scrollbars=1,";
  params += "resizable=1,";
  params += "top=0,";
  params += "left=0,";
  
// assign window name depending on image
  windowName = p_WImage;
	
  if (p_Width == "null")
   {
    params += "width=570,";
    params += "height=840";
   }
  else
   {
    if (screen.width > 801)
	  params += "width=" + (p_Width + 36) + ","; // image width + 36
	else
	  params += "width=" + (screen.width - 10) + ",";
    if (screen.height > 601)
	  params += "height=" + (p_Height + 40);  // image height + 40
	else
	  params += "height=" + (screen.height - 60);
   }

// close the window to vary the window size
  if (typeof(win) == "object" && !win.closed)
   {
    win.close();
   }

   win = window.open(url, windowName , params);
   if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1)
    {
     win = window.open(url, windowName , params);
    }
   if (!win.opener)
    {
     win.opener = window;
    }
// bring the window to the front
  win.focus();
}
/////////////////////
// Close window
/////////////////////
function CloseMe()
{
  if (self.parent.frames.length != 0)
  {
	self.parent.close();
  }
  else
  {
	close();
  }
}
