﻿
active = new Image(); 
notActive = new Image();

function preloader() 
{
    active.src = "/images/mainLinkArrowActive.png";
    notActive.src = "/images/mainLinkArrow.png";
}

	
// ADD GOOGLE PAGE TRACKER CODE HERE FOR PROD SITE ONLY -->

		
function checkSearch()
{
    var strSearchBox = strTrim(document.FormSearch.Text3.value);
	var pos = strSearchBox.indexOf("'");

	if (pos >= 0)
	{
		alert("Search values cannot contain an apostrophe. Please try again.");
		return false;
	}
	else
	{
		if (strSearchBox == "")
		{
			alert("Search value cannot be blank. Please try again.");
			return false;
		}
		else
		{
			return true;
		}
	}
}	

// trim routine
function strTrim (s)
{
    var iLen = s.length;
    var sOut = "";
    var chr = "";

    for (var i=0; i<iLen; i++)
    {
        chr = s.charAt (i); 
        if (chr!=" ")
        {
            sOut = sOut + chr; 
        }
    }
    return sOut;
}

//source code entry validation code
function checkSC() 
{
    strCode = strTrim(document.formsc.code.value);
    if ((strCode.length < 3) || (strCode.length > 10))
    {
        alert("You must enter a valid source code.");
        return false;
    }
	else 
    {
	    return true;
    }
}		

function openFeedbackWindow(fbSource) 
{
    //strLink = 'https://www.allegiancetech.com/feedback/feedbackLoop.jsp?companyId=739912';
    strLink = 'http://www.keysurvey.com/survey/42196/1814/';
    open(strLink, "feedbackloop", "scrollbars=yes,toolbar=no,resizable=yes,width=775,height=535");
}

function checkCPT() {
    var message = "You are about to purchase a copyrighted publication from Ingenix. Like the publication itself, this link may not be reproduced, transmitted, stored, or retrieved in any form or by any means, except as allowed by law, without the expressed written permission of the publisher. Any unauthorized distribution of this link or the publication to which it provides access may violate Ingenix's copyright and subject the distributor and/or the recipient of the link to civil liability.\n\nYou will only be able to purchase this product if you accept the terms above. To accept, click 'OK' and the product will be added to your cart. If you select 'Cancel' the item will not be added to your cart";

    if (window.confirm(message))
        return true;
    else
        return false;
}