<!-- Begin

var dLicenseValue = 0;
var dOptionsValue = 0;
var strLicenseName = "";
var strOptionsName = "";
var strParam = "";
var strLicenseValue = "";
var strOptionsValue = "";
var strFrom = "";

function Popup(strPage, iWidth, iHeight)
{
   var w = iWidth;
   var h = iHeight;
   var winl = (screen.width-w)/2;
   var wint = (screen.height-h)/2;
	
   var strText = "";
   if (document.m_OrderForm.item_number.value != null)
   {
      strText = document.m_OrderForm.item_number.value;
   }

   if (strText.indexOf("WEBMONITORDUMMY_PROFESSIONAL") == 0)
   {
      strPage += "#PROFESSIONAL";
   }
   else if (strText.indexOf("WEBMONITORDUMMY_PERSONAL") == 0)
   {
      strPage += "#PERSONAL";
   }
   else if (strText.indexOf("WEBMONITORDUMMY_MASTER") == 0)
   {
      strPage += "#CORPORATE";
   }
   else
   {
      strPage += "#LICENSES";
   }

   if (winl < 0)
   	winl = 0;
		
   if (wint < 0)
   	wint = 0;
		
   windowprops = "height="+h+",width="+w+",top="+ wint +",left="+ winl +",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,status=no";
   window.open(strPage, "", windowprops);
}

function QSHandler()
{
   var qs=location.search.substr(1).split("&");
   this.data=[];
   for(var i=0;i<qs.length;i++) this.data[qs[i].split("=")[0]]=qs[i].split("=")[1];

   this.QueryString=function(x) 
   {
      return this.data[x];
   };
} 

var Request = new QSHandler();

function GetReferral()
{
   if (Request.QueryString("license"))
   {
      strParam = Request.QueryString("license");

      if (strParam == "PERSONAL")
      {
         document.m_OrderForm.m_License.selectedIndex = 2;
      }
      else if (strParam == "PROFESSIONAL")
      {
         document.m_OrderForm.m_License.selectedIndex = 1;
      }
      else if (strParam == "MASTER")
      {
         document.m_OrderForm.m_License.selectedIndex = 0;
      }
   }

   if (Request.QueryString("from"))
   {
      strFrom = Request.QueryString("from");
   }
} 

function ChangeLicense()
{
   var strValue = "";
   dLicenseValue = 0;
   var dTotal = 0;
   
   box = document.m_OrderForm.m_License;
   strValue = box.options[box.selectedIndex].value;

   if (strValue == "WEBMONITORDUMMY_PERSONAL")
   {
      dLicenseValue = 44.95;
      strLicenseName = "WebMonitorDummy Personal Edition";
   }
   else if (strValue == "WEBMONITORDUMMY_PROFESSIONAL")
   {
      dLicenseValue = 64.95;
      strLicenseName = "WebMonitorDummy Professional Edition";
   }
   else if (strValue == "WEBMONITORDUMMY_MASTER")
   {
      dLicenseValue = 94.95;
      strLicenseName = "WebMonitorDummy Master Edition";
   }
  
   dTotal = (dLicenseValue + dOptionsValue);
   dTotal = dTotal.toFixed(2);
   document.m_OrderForm.m_OrderTotal.value = dTotal;

   // Fill out the item_name.
   document.m_OrderForm.item_name.value = strLicenseName;
   
   if (strOptionsName.length > 0)
   {
      document.m_OrderForm.item_name.value += ", ";
      document.m_OrderForm.item_name.value += strOptionsName;
   }

   strLicenseValue = strValue;

   // Fill out the item_number.
   document.m_OrderForm.item_number.value = strLicenseValue;
   if (strOptionsValue.length > 0)
   {
      document.m_OrderForm.item_number.value += "_";
      document.m_OrderForm.item_number.value += strOptionsValue;
   }

   if (strFrom.length > 0)
   {
      document.m_OrderForm.item_number.value += "_";
      document.m_OrderForm.item_number.value += strFrom;
   }

   // Update amount.
   document.m_OrderForm.amount.value = document.m_OrderForm.m_OrderTotal.value;   
}

function CheckBox()
{
   var dTotal = 0;
   var strValue = "";
   dOptionsValue = 0;
   strOptionsName = "";

   if (document.m_OrderForm.m_Check1 && document.m_OrderForm.m_Check1.checked)
   {
      dOptionsValue += 34.95;
      strOptionsName += "SEO Expansion Plug-in Pack";
      
      strValue = "EXPANSIONPACK_";
   }

   if (document.m_OrderForm.m_Check2 && document.m_OrderForm.m_Check2.checked)
   {
      dOptionsValue += 24.95;
      if (strOptionsName.length > 0)
      {
         strOptionsName += ", ";
      }
      strOptionsName += "RSSTop55 Plug-in";
      
      strValue += "RSSTOPFIVE_";
   }

   if (document.m_OrderForm.m_Check3 && document.m_OrderForm.m_Check3.checked)
   {
      dOptionsValue += 34.95;
      if (strOptionsName.length > 0)
      {
         strOptionsName += ", ";
      }
      strOptionsName += "Podcast Plug-in";
      
      strValue += "PODCAST_";
   }

   if (document.m_OrderForm.m_Check4 && document.m_OrderForm.m_Check4.checked)
   {
      dOptionsValue += 49.95;
      if (strOptionsName.length > 0)
      {
         strOptionsName += ", ";
      }
      strOptionsName += "Blog Blaster SEO Edition";
      
      strValue += "BLOGBLASTERSEO_";
   }

   if (document.m_OrderForm.m_Check5 && document.m_OrderForm.m_Check5.checked)
   {
      dOptionsValue += 94.95;
      if (strOptionsName.length > 0)
      {
         strOptionsName += ", ";
      }
      strOptionsName += "TrackbackSpeed SEO Edition";
      
      strValue += "TRACKBACKSPEEDSEO";
   }
   
   dTotal = dLicenseValue + dOptionsValue;
   dTotal = dTotal.toFixed(2);
   document.m_OrderForm.m_OrderTotal.value = dTotal;
   
   // Fill out the item_name.
   document.m_OrderForm.item_name.value = strLicenseName;
   
   if (strOptionsName.length > 0)
   {
      document.m_OrderForm.item_name.value += ", ";
      document.m_OrderForm.item_name.value += strOptionsName;
   }

   strOptionsValue = strValue;
   
   // Fill out the item_number.
   document.m_OrderForm.item_number.value = strLicenseValue;
   if (strOptionsValue.length > 0)
   {
      document.m_OrderForm.item_number.value += "_";
      document.m_OrderForm.item_number.value += strOptionsValue;
   }
   
   if (strFrom.length > 0)
   {
      document.m_OrderForm.item_number.value += "_";
      document.m_OrderForm.item_number.value += strFrom;
   }

   // Update amount.
   document.m_OrderForm.amount.value = document.m_OrderForm.m_OrderTotal.value;   
}

//  End -->