﻿function MM_swapImgRestore()
{ //v3.0
   var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function MM_preloadImages()
{ //v3.0
   var d = document; if (d.images)
   {
      if (!d.MM_p) d.MM_p = new Array();
      var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
         if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; }
   }
}

function MM_findObj(n, d)
{ //v4.01
   var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length)
   {
      d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
   }
   if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
   for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
   if (!x && d.getElementById) x = d.getElementById(n); return x;
}

function MM_swapImage()
{ //v3.0
   var i, j = 0, x, a = MM_swapImage.arguments; document.MM_sr = new Array; for (i = 0; i < (a.length - 2); i += 3)
      if ((x = MM_findObj(a[i])) != null) { document.MM_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; }
}


var urlAddress = "http://www.AlignNetworks.com";
var pageName = "Align Networks - Bringing Payors, Providers and Patients Together";

function addToFavorites()
{
   if (window.external)
   {
      window.external.AddFavorite(urlAddress, pageName)
   }
   else
   {
      alert("Sorry! Your browser doesn't support this function.");
   }
}
function email(name, domain, suffix, text)
{
   var address = name + "\u0040" + domain + "." + suffix;
   var url = "mailto:" + address;

   if (!text)
   {
      text = address;
   }
   document.write("<a href=\"" + url + "\">" + text + "</a>");
}

function emailWhite(name, domain, suffix, text)
{
   var address = name + "\u0040" + domain + "." + suffix;
   var url = "mailto:" + address;

   if (!text)
   {
      text = address;
   }
   document.write("<a href=\"" + url + "\"  style='color:white;font-size:13px;'>" + text + "</a>");
}

function OpenWin(url)
{
   WindowWidth = 900, WindowHeight = 750, LeftPos = 0, TopPos = 0
   LeftPos = (screen.width - WindowWidth) / 2
   TopPos = (screen.height - WindowHeight) / 2
   window.open(url, '_blank', 'toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes ,width=' + WindowWidth + ',height=' + WindowHeight + ', top=' + TopPos + ', left=' + LeftPos + '')
}

function OpenMobileWin()
{
   WindowWidth = 570, WindowHeight = 800, LeftPos = 0, TopPos = 0
   window.open('http://onthego.alignnetworks.com', 'onthego', 'toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes ,width=' + WindowWidth + ',height=' + WindowHeight + ', top=' + TopPos + ', left=' + LeftPos + '')
}

function OpenQuizWin(url)
{
   window.open(url, '_blank', 'toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes,top=10, left=10, width=800,height=700')
   return false;
}

function OpenReferral()
{
   window.open('https://compass.alignnetworks.com/Proxy/ReferralRequest.aspx', 'ReferralRequest', 'toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes,top=20, left=20, width=800, height=900')
}

function OpenPrivPol()
{
   window.open('/PrivacyPolicy.aspx', 'PrivacyPolicy', 'toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=500,height=700,top=20, left=20')
}

function OpenSurvey()
{
   WindowWidth = 850, WindowHeight = 830, LeftPos = 0, TopPos = 0
   LeftPos = (screen.width - WindowWidth) / 2
   TopPos = (screen.height - WindowHeight) / 2
   window.open('http://www.MyCustomerResponse.com/Surveys/InitSurvey.aspx?SID=3&AID=74', 'AlignSurvey', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes ,width=' + WindowWidth + ',height=' + WindowHeight + ', top=' + TopPos + ', left=' + LeftPos + '')
}

function OpenClientPortal()
{
   WindowWidth = 950, WindowHeight = 830, LeftPos = 0, TopPos = 0
   LeftPos = (screen.width - WindowWidth) / 2
   TopPos = (screen.height - WindowHeight) / 2
   window.open('http://compass.AlignNetworks.com/Default.aspx', 'ClientPortal', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes ,width=' + WindowWidth + ',height=' + WindowHeight + ', top=' + TopPos + ', left=' + LeftPos + '')
}

/* 06/23/2010 changed this to simply redirect */
function OpenProviderPortal()
{
/*
   WindowWidth = 950, WindowHeight = 830, LeftPos = 0, TopPos = 0
   LeftPos = (screen.width - WindowWidth) / 2
   TopPos = (screen.height - WindowHeight) / 2
   window.open('http://claimstatus.AlignNetworks.com', 'ProviderPortal', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes ,width=' + WindowWidth + ',height=' + WindowHeight + ', top=' + TopPos + ', left=' + LeftPos + '')
*/
   window.location = "http://claimstatus.AlignNetworks.com";
}

function OpenDictionaryResource(args)
{
   //alert('Our Clinical Resource is coming soon...');
   
   WindowWidth = 950, WindowHeight = 830, LeftPos = 0, TopPos = 0
   LeftPos = (screen.width - WindowWidth) / 2
   TopPos = (screen.height - WindowHeight) / 2
   //window.open('http://compass.AlignNetworks.com/Proxy/DictionaryResourceViewer.aspx', 'DictionaryResourceViewer', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes ,width=' + WindowWidth + ',height=' + WindowHeight + ', top=' + TopPos + ', left=' + LeftPos + '')
   window.open('http://compass.alignnetworks.com/Proxy/DictionaryResourceViewer.aspx?DRID=1', 'DictionaryResourceViewer', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes ,width=' + WindowWidth + ',height=' + WindowHeight + ', top=' + TopPos + ', left=' + LeftPos + '')
   
}

function ShowProviderDetails(modalWinClientID, ddlPRStatesID, lblProviderRepContactInfoClientID)
{
   var mpePopupProviderRelations = $find(modalWinClientID);
   var selectedProvider = $get(ddlPRStatesID);
   if (selectedProvider.value.length > 0)
   {
      var lblProviderRepContactInfo = $get(lblProviderRepContactInfoClientID);
      lblProviderRepContactInfo.innerHTML = "Align Networks' Provider Relations Representative <b>" + selectedProvider.value + "</b> will be glad to speak to you about any Provider Questions you may have.&nbsp;&nbsp;&nbsp;Call today!";
      mpePopupProviderRelations.show();
   }
   return false;
}

function ShowSalesDetails(modalWinClientID, ddlPRStatesID, lblProviderRepContactInfoClientID)
{
   var mpePopupProviderRelations = $find(modalWinClientID);
   var selectedProvider = $get(ddlPRStatesID);
   if (selectedProvider.value.length > 0)
   {
      var lblProviderRepContactInfo = $get(lblProviderRepContactInfoClientID);
      lblProviderRepContactInfo.innerHTML = "Align Networks' Sales Representative <b>" + selectedProvider.value + "</b> will be glad to speak to you about any Company Questions you may have.&nbsp;&nbsp;&nbsp;Call today!";
      mpePopupProviderRelations.show();
   }
   return false;
}

function CloseModalDetails(modalWinClientID)
{
   var mod = $find(modalWinClientID);
   mod.hide();
   return false;
}

function OpenRegionMap()
{
   WindowWidth = 950, WindowHeight = 830, LeftPos = 0, TopPos = 0
   LeftPos = (screen.width - WindowWidth) / 2
   TopPos = (screen.height - WindowHeight) / 2
   //window.open('/images/PDF/022410_RegionMap.pdf', 'RegionMap', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes ,width=' + WindowWidth + ',height=' + WindowHeight + ', top=' + TopPos + ', left=' + LeftPos + '')
   window.open('/images/PDF/SalesRegionsMap091410.pdf', 'RegionMap', 'toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes ,width=' + WindowWidth + ',height=' + WindowHeight + ', top=' + TopPos + ', left=' + LeftPos + '')
}
