var couponwidthdefault='400';
var couponheightdefault='500';
var couponiddefault='138';

function validateForm(theForm)
	{
		// Customize these calls for your form
		// Start ------->
		if (!validFirstName(theForm.FirstName))
			return false;
		if (!validLastName(theForm.LastName))
			return false;
		if (!validRequired(theForm.Email,"email"))
			return false;
		if (!validEmail(theForm.Email,"Email",true))
			return false;
		// <--------- End
		//validateCustomForm(theForm);
		return true;
}

function validateFormChange(theForm)
	{
		if (!validRequired(theForm.Emailnew,"email"))
			return false;
		if (!validEmail(theForm.Emailnew,"Email",true))
			return false;
	//	validateCustomForm(theForm);
		return true;
	}
	
function validateFormUnsubscribe(theForm)
	{
		if (!validRequired(theForm.vEmailAddress,"email"))
			return false;
		if (!validEmail(theForm.vEmailAddress,"Email",true))
			return false;
		//validateCustomForm(theForm);
		return true;
	}

	
var agt=navigator.userAgent.toLowerCase();
///////////////////
// Browser Version
///////////////////
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);

var is_ns  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1));
var is_ns2 = (is_ns && (is_major == 2));
var is_ns3 = (is_ns && (is_major == 3));
var is_ns4 = (is_ns && (is_major == 4));
var is_ns4up = (is_ns && (is_major >= 4));
var is_ns5 = (is_ns && (is_major == 5));
var is_ns5up = (is_ns && (is_major >= 5));

var is_ie   = (agt.indexOf("msie") != -1);
var is_ie3  = (is_ie && (is_major < 4));
var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) && (agt.indexOf("msie 5.5")==-1));
var is_ie4up  = (is_ie  && (is_major >= 4));
var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) || (agt.indexOf("msie 5.5")!=-1));
var is_ie5up  = (is_ie  && !is_ie3 && !is_ie4);

var is_aol   = (agt.indexOf("aol") != -1);
var is_aol3  = (is_aol && is_ie3);
var is_aol4  = (is_aol && is_ie4);

var is_opera = (agt.indexOf("opera") != -1);
var is_webtv = (agt.indexOf("webtv") != -1);
////////////
// Platform
////////////
var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
var is_win16 = ((agt.indexOf("win16")!=-1) || (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("windows 16-bit")!=-1) );
var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) || (agt.indexOf("windows 16-bit")!=-1));

var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
//var is_win2k = (agt.indexOf("windows nt 5.0")!=-1);
var is_win32 = (is_win95 || is_winnt || is_win98 || ((is_major >= 4) && (navigator.platform == "Win32")) || (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));

var is_os2   = ((agt.indexOf("os/2")!=-1) || (navigator.appVersion.indexOf("OS/2")!=-1) || (agt.indexOf("ibm-webexplorer")!=-1));

var is_mac= (agt.indexOf("mac")!=-1);
var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) || (agt.indexOf("68000")!=-1)));
var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) || (agt.indexOf("powerpc")!=-1)));
/////////////////////////////////////
// Detect IE 4.5 on the mac
// Mucho Problemos with this browser
/////////////////////////////////////
var is_ie45mac  = (is_mac && is_ie && (agt.indexOf("msie 5.0")==-1) && (agt.indexOf("msie 5.5")==-1) && (agt.indexOf("msie 4.5")!=-1));

<!-- Begin
function addbookmark()
{
if (is_ie) {
var bookmarkurl="http://www.fvpsurgery.com";
var bookmarktitle="Fox Valley Plasitc Surgery Website";
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
 }
 else {
 alert('Don\'t forget to bookmark www.fvpsurgery.com!');
 }
}
// End -->

function OpenCouponConsultation()
{
	var cgi = new Object();
      cgi.http_host = location.host;
      cgi.http_user_agent = navigator.userAgent;
      cgi.http_cookie = document.cookie;
      cgi.https = (location.protocol == 'https:\/\/') ? 'on' : 'off';
      cgi.path_info = (location.pathname.indexOf('?') != -1) ?
location.pathname.substring(0, location.pathname.indexOf('?')) :
location.pathname;
      cgi.query_string = (location.search) ?
((location.search.indexOf('#') != -1) ? location.search.substring(1,
location.search.indexOf('#')) : location.search.substring(1)) : '';
      cgi.script_name = cgi.path_info;
      cgi.http_referer = document.referrer;
	var LinkLocation =
"http://www.etnasystems.com/coupon/?COUPONID=146&OriginalReferer=" +
getCookie("JSREF") + "&OriginalPage=" + cgi['script_name'];
//alert("link=" + LinkLocation);
	openWindow(LinkLocation, 'Coupon', '375', '500');
}

function OpenCouponPhotofacial()
{
	var cgi = new Object();
      cgi.http_host = location.host;
      cgi.http_user_agent = navigator.userAgent;
      cgi.http_cookie = document.cookie;
      cgi.https = (location.protocol == 'https:\/\/') ? 'on' : 'off';
      cgi.path_info = (location.pathname.indexOf('?') != -1) ?
location.pathname.substring(0, location.pathname.indexOf('?')) :
location.pathname;
      cgi.query_string = (location.search) ?
((location.search.indexOf('#') != -1) ? location.search.substring(1,
location.search.indexOf('#')) : location.search.substring(1)) : '';
      cgi.script_name = cgi.path_info;
      cgi.http_referer = document.referrer;
	var LinkLocation =
"http://www.etnasystems.com/coupon/?COUPONID=194&OriginalReferer=" +
getCookie("JSREF") + "&OriginalPage=" + cgi['script_name'];
//alert("link=" + LinkLocation);
	openWindow(LinkLocation, 'Coupon', '375', '500');
}

<!--- Video Player --->
function createaudioplayer(itemNumber, go, list) {
	if (list == "interviews") {
		list = "/interviews-sitemap-rss.xml";
	}
	else if (list == "kfiz") {
		list = "/interviews-kfiz-sitemap-rss.xml";
	}
	else if (list == "vein") {
		list = "/audio-sitemap-vein-care.xml";
	}
	else if (list == "laser") {
		list = "/audio-sitemap-laser.xml";
	}
	else {
		list = "/audio-sitemap-rss.xml";	
	}
	var flashvars = {
		"file": list,
		"skin": "/flash/jw-skin.swf",
		"item": itemNumber,
		"autostart": go,
		"backcolor": "a8612d",
		"frontcolor": "ffffff",
		"lightcolor": "ffffff",
		"screencolor": "000000"
	};
	var params = {
		"wmode": "transparent"
	};
	var attributes = {
		"id": "playerID",
		"name": "playerID"
	};
	swfobject.embedSWF("/flash/jw-player.swf", "audioPlayer", "320", "36", "9.0.0", false, flashvars, params, attributes);
}
var player    =  null;
var playlist  =  null;


function playerReady(obj)
{
player = gid(obj.id);
addListeners();
};


function addListeners()
{
playlist = player.getPlaylist();

if(playlist.length > 0)
{
  player.addModelListener('STATE', 'stateMonitor');
  player.addModelListener('TIME',  'timeMonitor');
}
else
{
  setTimeout("addListeners();", 100);
}
};


function stateMonitor(obj)
{
if(obj.newstate == 'COMPLETED')
{
  //...load a new page when the media file completes playing
  currentVideo = document.getElementById('playerID').getConfig().item;
  if (currentVideo == (playlist.length - 1))
  {
	newVideo(0, false);
  }
  else
  {
	newVideo(currentVideo + 1, true);
  }
}
};
function newVideo (videoNumber, autostart) {
	document.getElementById('playerID').sendEvent('ITEM', videoNumber);	
	document.getElementById('playerID').sendEvent('PLAY', autostart);	
}

function gid(name)
{
return document.getElementById(name);
};
