<!--

/*
// Check if cookies enables

var cookieEnabled=(navigator.cookieEnabled)? true : false

//alert('1 - ' + cookieEnabled);

//if not IE4+ nor NS6+
if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){ 
document.cookie="testcookie"
cookieEnabled=(document.cookie=="testcookie")? true : false
document.cookie="" //erase dummy value
//alert('2 - ' + cookieEnabled);
}

if (!cookieEnabled) 
{
alert("You need to enable cookies on your web browser to continue. This application uses non-persistent cookies that only reside in memory while your browser window is open, once you close your browser window the cookie is deleted from memory.");
//document.location =  'browserrequirementsandsecuritystandards.cfm#cookies';
}

*/



if ((navigator.appName.indexOf("Microsoft") != -1) || (navigator.userAgent.indexOf("Opera") != -1) || ( 
(navigator.appName.indexOf("Netscape") != -1) && (parseInt(navigator.appVersion.substring(navigator.appVersion.indexOf(".")-1)) > 4))
 || ((navigator.appName.indexOf("Netscape") != -1) && (navigator.appVersion.indexOf("Mac") != -1) && (parseInt(navigator.appVersion.substring(navigator.appVersion.indexOf(".")-1)) > 3)  ))
  {
 document.write('<link rel="stylesheet" type="text/css" href="css/main.css">');
  } 
else 
  {
    document.write('<link rel="stylesheet" type="text/css" href="css/main-netscape.css">');
  }


var isN4, isN6, isIE, isIE5, isIE6, isIE7, isOpera8, isFirefox, isSafari, isMac
var thebrowser = ""
var coll = ""
var styleobj = ""
var bgcolorobj = ""


isN4 = false;
isN6 = false;
isIE = false;
isIE5 = false;
isIE6 = false;
isIE7 = false;
isOpera8 = false;
isFirefox = false;
isSafari = false;
isMac = false;

if (navigator.appVersion.indexOf("Mac") != -1)
{
isMac = true;
}

if (parseInt(navigator.appVersion) >= 4)
{


navigator.userAgent.indexOf("Opera") != -1



	if (navigator.appName == "Netscape")
	{
		if (document.getElementById && !document.all)
		{
		isN6 = true;
		thebrowser = 'isN6';
		bgcolorobj  = 'background-color';
		
		if (navigator.userAgent.indexOf("Firefox") != -1)
			{
			isFirefox = true;
			thebrowser = 'isFirefox';
			bgcolorobj  = 'background-color';
			}
			
		if (navigator.userAgent.indexOf("Safari") != -1)
			{
			isSafari = true;
			thebrowser = 'isSafari';
			bgcolorobj  = 'background-color';
			}
		
		}
		else
		{
		if (document.layers)
		{
		isN4 = true;
		thebrowser = 'isN4';
		bgcolorobj  = 'bgcolor';
		}
		}
	}
	else
	{
		
	
		if (navigator.userAgent.indexOf("Opera") != -1 && (parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("Opera")+6)) >= 8) )
		{
		isOpera8 = true;
		thebrowser = 'isOpera8';
		bgcolorobj  = 'background-color';
		//alert(parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("Opera")+6)));
		}
		
		
		if (parseInt(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5))  && navigator.userAgent.indexOf("Opera") == -1)
		{
		isIE7 = true;
		isIE6 = true; // set this as well
		thebrowser = 'isIE7';
		bgcolorobj  = 'background-color';
		}
		else
		{
		
		if (navigator.appVersion.indexOf("MSIE 6") != -1 && navigator.userAgent.indexOf("Opera") == -1)
		{
		isIE6 = true;
		thebrowser = 'isIE6';
		bgcolorobj  = 'background-color';
		}
		else
		{
		
		if (navigator.appVersion.indexOf("MSIE 5") != -1 && navigator.userAgent.indexOf("Opera") == -1)
		{
		isIE5 = true;
		thebrowser = 'isIE5';
		bgcolorobj  = 'background-color';
		}
		else
		{
			if (navigator.appVersion.indexOf("MSIE 4") != -1)
			{
			isIE = true;
			thebrowser = 'isIE4';
			coll = 'all.';
			styleObj = '.style';
			bgcolorobj  = 'background-color';
			}
			else
			{
			isIE7 = true;
			isIE6 = true; // set this as well
			thebrowser = 'isIE7';
			bgcolorobj  = 'background-color';
			}	
			

		}
	  }
	 }
	}

	/*
	// for testing
	if( isIE || isIE5 || isIE6 || isN4 || isN6 || isOpera)
	{
	top.location.href = "new_browser_needed.cfm";
	}	
	*/
	
	//alert(isIE5 + '-' + isIE6 + '-' + isN4 + '-' + isN6 + '-' + isFirefox + '-' + isOpera8 + '-' + isSafari);
	
	if(!isIE5 && !isIE6 && !isIE7 && !isN4 && !isN6 && !isFirefox && !isOpera8 && !isSafari)
	{
	top.location.href = "new_browser_needed.cfm";
	}	
	

}

//alert(isN6);

function submit_ResolveDateSearchForm(thisform,sort,newsearch) 
{

//alert('Here I\'m!');
if (newsearch == 0)
{
document.resolved_complaint_date_search.date_submitted.value = 0;
}
document.resolved_complaint_date_search.formsort.value = sort;
document.resolved_complaint_date_search.action = "complaint_complaint_list.cfm?mode=resolved&sort=" + sort ;
document.resolved_complaint_date_search.submit();
}	
	
	
function openNewWindow(locURL,winWidth,winHeight)
{

// Initialize Variables for the Screen.

XPos = 100;
YPos = 0;
XWidth = winWidth;
YHeight = winHeight;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'yes';
constStatus = 'no';
constTitlebar = 'no';
constToolbar = 'no';
constResizable = 'no';
//window.newWindow = '';


// If the Browser can understand the screen object, set window coordinates

if (window.screen)
	{
	YPos = ((screen.availHeight - YHeight) / 2);
	}

// If the window is open, just refresh the contents, otherwise create new window

if (window.newWindow)
	{
	if (isN4){
	newWindow.close();
	}
	else
	{
	newWindow.close();
	}
	newWindow = window.open(locURL,"newWindow",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	//newWindow.location.href = locURL;
	}
else
	{
	newWindow = window.open(locURL,"newWindow",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	if (! newWindow.opener)
		{
		newWindow.opener = window;
		}
	}
	
		
if (newWindow.focus)
	{
	newWindow.focus();
	}
}// end of openNewWindow(locURL)

function openNewWindowScroll(locURL,winWidth,winHeight)
{

// Initialize Variables for the Screen.

XPos = 20;
YPos = 20;
XWidth = winWidth;
YHeight = winHeight;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'yes';
constStatus = 'no';
constTitlebar = 'no';
constToolbar = 'no';
constResizable = 'yes';
//window.newWindow = '';


// If the Browser can understand the screen object, set window coordinates

//if (window.screen)
	//{
	//YPos = ((screen.availHeight - YHeight) / 2);
	//}

// If the window is open, just refresh the contents, otherwise create new window

if (window.newWindow2)
	{
	if (isN4){
	newWindow2.close();
	}
	else
	{
	newWindow2.close();
	}
	newWindow2 = window.open(locURL,"newWindow2",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	//newWindow.location.href = locURL;
	}
else
	{
	newWindow2 = window.open(locURL,"newWindow2",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	if (! newWindow2.opener)
		{
		newWindow2.opener = window;
		}
	}
	
		
if (newWindow2.focus)
	{
	newWindow2.focus();
	}
}// end of openNewWindowScroll(locURL)
		
function openNewWindowCityStateCounty(locURL,theform,winWidth,winHeight,maine_only)
{

//alert('In openNewWindow maine_only - ' + maine_only)

if(maine_only)
{
locURL = locURL + '?flag=1&zip=' + eval('document.' + theform + '.zip.value') + '&f=' + theform;
}
else
{
locURL = locURL + '?zip=' + eval('document.' + theform + '.zip.value') + '&f=' + theform;
}

// Initialize Variables for the Screen.

XPos = 400;
YPos = 0;
XWidth = winWidth;
YHeight = winHeight;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'no';
constStatus = 'no';
constTitlebar = 'no';
constToolbar = 'no';
constResizable = 'no';
//window.newWindow = '';


// If the Browser can understand the screen object, set window coordinates

if (window.screen)
	{
	YPos = ((screen.availHeight - YHeight) / 2);
	}

// If the window is open, just refresh the contents, otherwise create new window

if (window.newWindow)
	{
	if (isN4){
	newWindow.close();
	}
	else
	{
	newWindow.close();
	}
	newWindow = window.open(locURL,"newWindow",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	//newWindow.location.href = locURL;
	}
else
	{
	newWindow = window.open(locURL,"newWindow",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	if (! newWindow.opener)
		{
		newWindow.opener = window;
		}
	}
	
		
if (newWindow.focus)
	{
	newWindow.focus();
	}
}// end of openNewWindowCounty(locURL)
	
function openNewWindowAllActivity(winWidth,winHeight)
{

// Initialize Variables for the Screen.

XPos = 400;
YPos = 0;
XWidth = winWidth;
YHeight = winHeight;
constLocation = 'yes';
constMenubar = 'yes';
constScrollbars = 'yes';
constStatus = 'yes';
constTitlebar = 'yes';
constToolbar = 'yes';
constResizable = 'yes';
//window.newWindow = '';

var locURL

locURL = 'clients_detail.cfm?id=';

var tempstr, temparray

tempstr = document.frmDeterminationAddEdit.consumerid.value;

if (tempstr != '')
{

temparray = tempstr.split('~');

locURL = locURL + temparray[0];

// If the Browser can understand the screen object, set window coordinates

if (window.screen)
	{
	YPos = ((screen.availHeight - YHeight) / 2);
	}

// If the window is open, just refresh the contents, otherwise create new window

if (window.newWindow)
	{
	if (isN4){
	newWindow.close();
	}
	else
	{
	newWindow.close();
	}
	newWindow = window.open(locURL,"newWindow",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	//newWindow.location.href = locURL;
	}
else
	{
	newWindow = window.open(locURL,"newWindow",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	if (! newWindow.opener)
		{
		newWindow.opener = window;
		}
	}
	
		
if (newWindow.focus)
	{
	newWindow.focus();
	}

}	

return false;
	
}// end of openNewWindowAllActivity(locURL,winWidth,winHeight)	



function openNewWindowBuildDropDown(locURL,theform,formitem,winWidth,winHeight)
{

locURL = locURL + '?i=' + formitem + '&f=' + theform;


// Initialize Variables for the Screen.

XPos = 400;
YPos = 0;
XWidth = winWidth;
YHeight = winHeight;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'yes';
constStatus = 'no';
constTitlebar = 'no';
constToolbar = 'no';
constResizable = 'yes';
//window.newWindow = '';


// If the Browser can understand the screen object, set window coordinates

if (window.screen)
	{
	YPos = ((screen.availHeight - YHeight) / 2);
	}

// If the window is open, just refresh the contents, otherwise create new window

if (window.newWindow)
	{
	if (isN4){
	newWindow.close();
	}
	else
	{
	newWindow.close();
	}
	newWindow = window.open(locURL,"newWindow",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	//newWindow.location.href = locURL;
	}
else
	{
	newWindow = window.open(locURL,"newWindow",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	if (! newWindow.opener)
		{
		newWindow.opener = window;
		}
	}
	
		
if (newWindow.focus)
	{
	newWindow.focus();
	}
}// end of openNewWindowBuildDropDown(locURL)


function openNewWindowComments(locURL,winWidth,winHeight)
{

// Initialize Variables for the Screen.

XPos = 400;
YPos = 0;
XWidth = winWidth;
YHeight = winHeight;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'no';
constStatus = 'no';
constTitlebar = 'no';
constToolbar = 'no';
constResizable = 'no';
//window.newWindow = '';


// If the Browser can understand the screen object, set window coordinates

if (window.screen)
	{
	YPos = ((screen.availHeight - YHeight) / 2);
	}

// If the window is open, just refresh the contents, otherwise create new window

if (window.newWindowComments)
	{
	if (isN4){
	newWindowComments.close();
	}
	else
	{
	newWindowComments.close();
	}
	newWindowComments = window.open(locURL,"newWindowComments",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	//newWindow.location.href = locURL;
	}
else
	{
	newWindowComments = window.open(locURL,"newWindowComments",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	if (! newWindowComments.opener)
		{
		newWindowComments.opener = window;
		}
	}
	
		
if (newWindowComments.focus)
	{
	newWindowComments.focus();
	}
}// end of openNewWindowComments(locURL)



function openNewWindowProviderAddressEdit(locURL,winWidth,winHeight)
{

			// Initialize Variables for the Screen.

			XPos = 100;
			YPos = 0;
			XWidth = winWidth;
			YHeight = winHeight;
			constLocation = 'no';
			constMenubar = 'no';
			constScrollbars = 'yes';
			constStatus = 'no';
			constTitlebar = 'no';
			constToolbar = 'no';
			constResizable = 'no';
			//window.newWindow = '';


			// If the Browser can understand the screen object, set window coordinates

			if (window.screen)
			{
			YPos = ((screen.availHeight - YHeight) / 2);
			}

			// If the window is open, just refresh the contents, otherwise create new window

			if (window.newWindowProviderAddressEdit)
			{
				if (isN4){
				newWindowProviderAddressEdit.close();
				}
			else
			{
			newWindowProviderAddressEdit.close();
			}
			newWindowProviderAddressEdit = window.open(locURL,"newWindowProviderAddressEdit",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

			//newWindow.location.href = locURL;
			}
			else
			{
			newWindowProviderAddressEdit = window.open(locURL,"newWindowProviderAddressEdit",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

				if (! newWindowProviderAddressEdit.opener)
				{
				newWindowProviderAddressEdit.opener = window;
				}
			}
	
				if (newWindowProviderAddressEdit.focus)
				{
				newWindowProviderAddressEdit.focus();
				}
}// end of openNewWindowProviderAddressEdit(locURL)


function openNewWindowTransactionDetail(locURL,winWidth,winHeight)
{

			// Initialize Variables for the Screen.

			XPos = 100;
			YPos = 0;
			XWidth = winWidth;
			YHeight = winHeight;
			constLocation = 'no';
			constMenubar = 'no';
			constScrollbars = 'yes';
			constStatus = 'no';
			constTitlebar = 'no';
			constToolbar = 'no';
			constResizable = 'no';
			//window.newWindow = '';


			// If the Browser can understand the screen object, set window coordinates

			if (window.screen)
			{
			YPos = ((screen.availHeight - YHeight) / 2);
			}

			// If the window is open, just refresh the contents, otherwise create new window

			if (window.newWindowTransactionDetail)
			{
				if (isN4){
				newWindowTransactionDetail.close();
				}
			else
			{
			newWindowTransactionDetail.close();
			}
			
			newWindowTransactionDetail = window.open(locURL,"newWindowTransactionDetail",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

			//newWindow.location.href = locURL;
			}
			else
			{
			
			newWindowTransactionDetail = window.open(locURL,"newWindowTransactionDetail",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

				if (! newWindowTransactionDetail.opener)
				{
				newWindowTransactionDetail.opener = window;
				}
			}
	
				if (newWindowTransactionDetail.focus)
				{
				newWindowTransactionDetail.focus();
				}
				
}// end of openNewWindowTransactionDetail(locURL)

function editProvider(theidandname,mainid,frompage)
{
	
	if(theidandname != '')
	{
	//alert('In editProvider -' + theidandname + '-');
	var theurl
	theurl = 'forms_provider_addedit.cfm?id=' + theidandname.substring(0,theidandname.indexOf("~")) + '&update_outside=yes&mainid=' + mainid + '&frompage=' + frompage;
	//alert(theurl);
	openNewWindowProviderAddressEdit(theurl,800,450);
	}
	else
	{
	alert('Please select a provider/payee name first before trying to edit it.');
	}
	
	
}


			
function openNewWindowDups(locURL,winWidth,winHeight)
{

			// Initialize Variables for the Screen.

			XPos = 100;
			YPos = 0;
			XWidth = winWidth;
			YHeight = winHeight;
			constLocation = 'yes';
			constMenubar = 'yes';
			constScrollbars = 'yes';
			constStatus = 'no';
			constTitlebar = 'no';
			constToolbar = 'no';
			constResizable = 'no';
			//window.newWindow = '';


			// If the Browser can understand the screen object, set window coordinates

			if (window.screen)
			{
			YPos = ((screen.availHeight - YHeight) / 2);
			}

			// If the window is open, just refresh the contents, otherwise create new window

			if (window.newWindowDups)
			{
				if (isN4){
				newWindowDups.close();
				}
			else
			{
			newWindowDups.close();
			}
			newWindowDups = window.open(locURL,"newWindowDups",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

			//newWindow.location.href = locURL;
			}
			else
			{
			newWindowDups = window.open(locURL,"newWindowDups",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

				if (! newWindowDups.opener)
				{
				newWindowDups.opener = window;
				}
			}
	
				if (newWindowDups.focus)
				{
				newWindowDups.focus();
				}
}// end of openNewWindowDups(locURL)
	
			//alert('fundformid_out -' + <cfoutput>#fundformid_out#</cfoutput>);
	

function openNewWindowProviderAddress(locURL,winWidth,winHeight)
{

			// Initialize Variables for the Screen.

			XPos = 100;
			YPos = 0;
			XWidth = winWidth;
			YHeight = winHeight;
			constLocation = 'no';
			constMenubar = 'no';
			constScrollbars = 'yes';
			constStatus = 'no';
			constTitlebar = 'no';
			constToolbar = 'no';
			constResizable = 'no';
			//window.newWindow = '';


			// If the Browser can understand the screen object, set window coordinates

			if (window.screen)
			{
			YPos = ((screen.availHeight - YHeight) / 2);
			}

			// If the window is open, just refresh the contents, otherwise create new window

			if (window.newWindowProviderAddress)
			{
				if (isN4){
				newWindowProviderAddress.close();
				}
			else
			{
			newWindowProviderAddress.close();
			}
			newWindowProviderAddress = window.open(locURL,"newWindowProviderAddress",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

			//newWindow.location.href = locURL;
			}
			else
			{
			newWindowProviderAddress = window.open(locURL,"newWindowProviderAddress",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

				if (! newWindowProviderAddress.opener)
				{
				newWindowProviderAddress.opener = window;
				}
			}
	
				if (newWindowProviderAddress.focus)
				{
				newWindowProviderAddress.focus();
				}
}// end of openNewWindowProviderAddress(locURL)
				
function openNewWindowFormComments(locURL,winWidth,winHeight)
{

			// Initialize Variables for the Screen.

			XPos = 100;
			YPos = 0;
			XWidth = winWidth;
			YHeight = winHeight;
			constLocation = 'no';
			constMenubar = 'no';
			constScrollbars = 'yes';
			constStatus = 'no';
			constTitlebar = 'no';
			constToolbar = 'no';
			constResizable = 'yes';
			//window.newWindow = '';


			// If the Browser can understand the screen object, set window coordinates

			if (window.screen)
			{
			YPos = ((screen.availHeight - YHeight) / 2);
			}

			// If the window is open, just refresh the contents, otherwise create new window

			if (window.newWindowFormComments)
			{
				if (isN4){
				newWindowFormComments.close();
				}
			else
			{
			newWindowFormComments.close();
			}
			newWindowFormComments = window.open(locURL,"newWindowFormComments",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

			//newWindow.location.href = locURL;
			}
			else
			{
			newWindowFormComments = window.open(locURL,"newWindowFormComments",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

				if (! newWindowFormComments.opener)
				{
				newWindowFormComments.opener = window;
				}
			}
	
				if (newWindowFormComments.focus)
				{
				newWindowFormComments.focus();
				}
}// end of openNewWindowFormComments(locURL)
				
				
				
function shiftTo(obj, x, y) {

	if (isN4)
	{
	obj.moveTo(x,y)
	}
	
	if (isIE)
  	{

	document.all.banner.style.pixelLeft = x;
	document.all.banner.style.pixelTop = y;

	// obj.pixelLeft = x
	// obj.pixelTop = y
	}

  	if (isIE5 || isIE6 || isFirefox)
  	{
	obj.pixelLeft = x
	obj.pixelTop = y
	}
  
  	if (isN6)
  	{
	obj.left = x
	obj.top = y
	 // document.getElementById("banner").style.left = x;
  	// document.getElementById("banner").style.top = y;
  	}

	
}			

function openNewWindowOccurDetail(locURL,winWidth,winHeight)
{

// Initialize Variables for the Screen.

XPos = 100;
YPos = 0;
XWidth = winWidth;
YHeight = winHeight;
constLocation = 'no';
constMenubar = 'no';
constScrollbars = 'no';
constStatus = 'no';
constTitlebar = 'no';
constToolbar = 'no';
constResizable = 'no';
//window.newWindow = '';


// If the Browser can understand the screen object, set window coordinates

if (window.screen)
	{
	YPos = ((screen.availHeight - YHeight) / 2);
	}

// If the window is open, just refresh the contents, otherwise create new window

if (window.newWindowOccurDetail)
	{
	if (isN4){
	newWindowOccurDetail.close();
	}
	else
	{
	newWindowOccurDetail.close();
	}
	newWindowOccurDetail = window.open(locURL,"newWindowOccurDetail",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	//newWindow.location.href = locURL;
	}
else
	{
	newWindowOccurDetail = window.open(locURL,"newWindowOccurDetail",'location=' + constLocation + ',menubar=' + constMenubar + ',scrollbars=' + constScrollbars + ',status=' + constStatus + ',titlebar=' + constTitlebar + ',toolbar=' + constToolbar + ',resizable=' + constResizable + ',width=' + XWidth + ',height=' + YHeight + ',left=' + XPos + ',top=' + YPos);

	if (! newWindowOccurDetail.opener)
		{
		newWindowOccurDetail.opener = window;
		}
	}
	
		
if (newWindowOccurDetail.focus)
	{
	newWindowOccurDetail.focus();
	}
}// end of openNewWindowOccurDetail(locURL)


function opacity(id, opacStart, opacEnd, millisec) { 

    //speed for each frame 

    var speed = Math.round(millisec / 100); 

    var timer = 0; 

 

    //determine the direction for the blending, if start and end are the same nothing happens 

    if(opacStart > opacEnd) { 

        for(i = opacStart; i >= opacEnd; i--) { 

            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 

            timer++; 

        } 

    } else if(opacStart < opacEnd) { 

        for(i = opacStart; i <= opacEnd; i++) 

            { 

            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 

            timer++; 

        } 

    } 

} // function opacity

 

//change the opacity for different browsers 

function changeOpac(opacity, id) 
{ 

if (id != '')
{
    var object = document.getElementById(id).style; 

    object.opacity = (opacity / 100); 

    object.MozOpacity = (opacity / 100); 

    object.KhtmlOpacity = (opacity / 100); 

    object.filter = "alpha(opacity=" + opacity + ")"; 
}

} // function changeOpac(opacity, id)

 

 

function shiftOpacity(id, millisec) { 

    //if an element is invisible, make it visible, else make it ivisible 

    if(document.getElementById(id).style.opacity == 0) { 

        opacity(id, 0, 100, millisec); 

    } else { 

        opacity(id, 100, 0, millisec); 

    } 

}  // function shiftOpacity(id, millisec)

 

 

function blendimage(divid, imageid, imagefile, millisec) { 

    var speed = Math.round(millisec / 100); 

    var timer = 0; 

     

    //set the current image as background 

    document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")"; 

     

    //make image transparent 

    changeOpac(0, imageid); 

     

    //make new image 

    document.getElementById(imageid).src = imagefile; 

 

    //fade in image 

    for(i = 0; i <= 100; i++) { 

        setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed)); 

        timer++; 

    } 

} // function blendimage(divid, imageid, imagefile, millisec) 



function CheckIfInteger(formitem) {

var str

str = formitem.value;

//alert(formitem.value);

if (str.length != 0)
{		

if (str.charAt(0) != "")
{
for (j=0; j<str.length; j++) 
{
if ((str.charAt(j) != "0") && (str.charAt(j) != "1") && (str.charAt(j) != "2") && (str.charAt(j) != "3") && (str.charAt(j) != "4") && (str.charAt(j) != "5") && (str.charAt(j) != "6") && (str.charAt(j) != "7") && (str.charAt(j) != "8") && (str.charAt(j) != "9"))
  {
  	  alert('The value you entered is not an integer. Please check your input.');
	  //formitem.value = '';
	  formitem.focus();
	formitem.select();  
	return false;
  }
  }
}  
}

  
}// CheckIfInteger


function DisplayDesigns(sport,teamname)
{

if (teamname.charAt(0) == "1")
{

var re

//alert('here');

re = new RegExp ('1~', 'gi'); 
teamname= teamname.replace(re,'')

//document.images["standard_design"].src = 'images/' + sport + '_' + teamname + '_web.jpg';
document.images["fanatic_design"].src = 'images/' + sport + '_' + teamname + '_ball_web.jpg';

document.getElementById("links").innerHTML = '<a href="images/' + sport + '_' + teamname + '_ball_sm.jpg" class="smallLink" target="_blank">View Larger Team Colors Design (with specs)</a>';


document.getElementById("designs").innerHTML = '<a href="images/' + sport + '_' + teamname + '_ball_sm.jpg" class="smallLink" target="_blank"><img name="fanatic_design" src="images/' + sport + '_' + teamname + '_ball_web.jpg" width="160" height="280" alt="" border="0"></a>';

/*show both standard and team
document.getElementById("links").innerHTML = '<a href="images/' + sport + '_'  + teamname + '_sm.jpg" class="smallLink" target="_blank">View Larger Standard Design (with specs)</a><br><img src="../images/pixel_FFFFFF.gif" width="1" height="3" border="0" alt=""><br><a href="images/' + sport + '_' + teamname + '_ball_sm.jpg" class="smallLink" target="_blank">View Larger Team Colors Design (with specs)</a>';


document.getElementById("designs").innerHTML = '<a href="images/' + sport + '_' + teamname + '_sm.jpg" class="smallLink" target="_blank"><img name="standard_design" src="images/' + sport + '_' + teamname + '_web.jpg" width="160" height="280" alt="" border="0"></a><a href="images/' + sport + '_' + teamname + '_ball_sm.jpg" class="smallLink" target="_blank"><img name="fanatic_design" src="images/' + sport + '_' + teamname + '_ball_web.jpg" width="160" height="280" alt="" border="0"></a>';
*/

}
else
{
//document.images["standard_design"].src = 'images/pixel_clear.gif';
document.images["fanatic_design"].src ='images/pixel_clear.gif';

document.getElementById("links").innerHTML = '&nbsp;';
document.getElementById("designs").innerHTML = '<img name="standard_design" src="../images/pixel_FFFFFF.gif" width="160" height="280" border="0" alt=""><img name="fanatic_design" src="../images/pixel_FFFFFF.gif" width="160" height="280" border="0" alt="">';
}


}

function DisplayProductShotsHome(sport,teamname,inid,picturesize)
{

//alert('fddfads');

//alert('fff' + teamname);
teamname  = teamname.substr(0,teamname.lastIndexOf("~"));
//alert('fff' + teamname);

// inid is the id/name of the image being replaced

if (teamname.charAt(teamname.length -1) == "0")
//if (teamname.indexOf("~0") != -1)
{

var tempteamname
tempteamname= teamname.replace('~0','')
tempteamname= tempteamname.replace('~1','')
tempteamname= tempteamname.replace('1~','')
tempteamname= tempteamname.replace('_',' ')
tempteamname= tempteamname.replace('_',' ')
//alert('The ' + tempteamname + ' picture will be available soon.');

document.getElementById(inid).innerHTML = '<img src="images/product_picture_coming_soon.gif" width="' + picturesize + '" height="' + picturesize + '" alt="" border="0">';



return false
}

//alert(sport+'-'+teamname+'-'+inid);


if (teamname.charAt(0) == "1")
{

var re

//alert('here1');

re = new RegExp ('1~', 'gi'); 
teamname= teamname.replace(re,'')
teamname= teamname.replace('~0','')
teamname= teamname.replace('~1','')

//document.images["standard_design"].src = 'images/' + sport + '_' + teamname + '_web.jpg';
//document.images["fanatic_design"].src = 'images/product_shots/' + sport + '_' + teamname + '.jpg';

//document.getElementById("links").innerHTML = '2<a href="images/product_shots/' + sport + '_' + teamname + '_ball_sm.jpg" class="smallLink" target="_blank">View Larger Team Colors Design (with specs)</a>';

// good document.getElementById(inid).innerHTML = '<a href="images/product_shots/' + sport + '_' + teamname + '.jpg" class="smallLink" target="_blank"><img name="fanatic_design" src="images/product_shots/' + sport + '_' + teamname + '_sm.jpg" width="' + picturesize + '" height="' + picturesize + '" alt="CLICK TO VIEW LARGER PICTURE" border="0"></a>';

document.getElementById(inid).innerHTML = '<img name="fanatic_design" src="images/product_shots/' + sport + '_' + teamname + '_sm.jpg" width="' + picturesize + '" height="' + picturesize + '" border="0">';




// document.getElementById(inid).innerHTML = '<a href="images/product_shots/' + sport + '_' + teamname + '.jpg" class="smallLink" target="_blank"><img name="fanatic_design" src="images/product_shots/' + sport + '_' + teamname + '.jpg" width="' + picturesize + '" height="' + picturesize + '" alt="CLICK TO VIEW LARGER PICTURE" border="0"></a>';


/*
if (inid == 'pic1')
{
document.getElementById("pic1").innerHTML = '<a href="images/product_shots/' + sport + '_' + teamname + '.jpg" class="smallLink" target="_blank"><img name="fanatic_design" src="images/product_shots/' + sport + '_' + teamname + '.jpg" width="' + picturesize + '" height="' + picturesize + '" alt="CLICK TO VIEW LARGER PICTURE" border="0"></a>';
}
else if (inid == 'pic2')
{
document.getElementById("pic2").innerHTML = '<a href="images/product_shots/' + sport + '_' + teamname + '.jpg" class="smallLink" target="_blank"><img name="fanatic_design" src="images/product_shots/' + sport + '_' + teamname + '.jpg" width="' + picturesize + '" height="' + picturesize + '" alt="CLICK TO VIEW LARGER PICTURE" border="0"></a>';
}
*/


/*show both standard and team
document.getElementById("links").innerHTML = '<a href="images/product_shots/' + sport + '_'  + teamname + '_sm.jpg" class="smallLink" target="_blank">View Larger Standard Design (with specs)</a><br><img src="../images/pixel_FFFFFF.gif" width="1" height="3" border="0" alt=""><br><a href="images/' + sport + '_' + teamname + '_ball_sm.jpg" class="smallLink" target="_blank">View Larger Team Colors Design (with specs)</a>';


document.getElementById("designs").innerHTML = '<a href="images/product_shots/' + sport + '_' + teamname + '_sm.jpg" class="smallLink" target="_blank"><img name="standard_design" src="images/' + sport + '_' + teamname + '_web.jpg" width="160" height="280" alt="" border="0"></a><a href="images/' + sport + '_' + teamname + '_ball_sm.jpg" class="smallLink" target="_blank"><img name="fanatic_design" src="images/' + sport + '_' + teamname + '_ball_web.jpg" width="160" height="280" alt="" border="0"></a>';
*/

}
else
{
alert('here2');
//document.images["standard_design"].src = 'images/pixel_clear.gif';
document.images["fanatic_design"].src ='images/pixel_clear.gif';

document.getElementById("links").innerHTML = '&nbsp;';
document.getElementById("designs").innerHTML = '<img name="standard_design" src="../images/pixel_FFFFFF.gif" width="160" height="280" border="0" alt=""><img name="fanatic_design" src="../images/pixel_FFFFFF.gif" width="160" height="280" border="0" alt="">';
}


}


//alert('javascript_lib.js loaded');
//-->

