// JavaScript Document

function store_pop(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "how_it_works/ss1.htm", "Winscreenshots", "scrollbars=no,resizable=no,titlebar,width=612,height=432");
}

function forward_pop(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "how_it_works/sf1.htm", "Winscreenshots", "scrollbars=no,resizable=no,titlebar,width=612,height=432");
}

function partnertypes_pop(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "partner_window.htm", "Winscreenshots", "scrollbars=no,resizable=no,titlebar,width=650,height=610");
}

function ShowTxt(txt) {
		if(document.getElementById) document.getElementById('how_desc').innerHTML = txt;
}

function ClearTxt() {
		if(document.getElementById) document.getElementById('how_desc').innerHTML = 'Choose a service type to view an illustration explaining how that service works.';
}

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];}
}

function contactwindow(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "contact_window.aspx", "Winscreenshots", "scrollbars=yes,resizable=no,titlebar,width=366,height=400");
}

function pricingwindow(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "pricing_window.aspx", "Winscreenshots", "scrollbars=no,resizable=no,titlebar,width=475,height=400");
}

function termswindow(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "terms_window.htm", "Winscreenshots", "scrollbars=yes,resizable=no,titlebar,width=366,height=400");
}

function privacywindow(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "privacy_window.htm", "Winscreenshots", "scrollbars=yes,resizable=no,titlebar,width=366,height=400");
}

function jump2form(){
	document.login.q.select();
	document.login.q.focus();
}

function Form_Set_Focus()
{
	document.forms[0].elements["UserName_TextBox"].focus();
}

function help(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,location,width=585,height=555");
}

function bp(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#bp", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}
function ds_1(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#ds_1", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}

function ds_2(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#ds_2", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}

function ds_3(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#ds_3", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}

function ds_4(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#ds_4", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}

function ds_5(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#ds_5", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}

function fp(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#fp", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}

function wc(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#wc", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}

function wc_4(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#wc_4", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}

function wc_5(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#wc_5", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}
function wc_7(strPublicUrl)
{
	var winHdrs = window.open(strPublicUrl + "helpcenter.htm#wc_7", "Winscreenshots", "scrollbars=yes,resizable=yes,titlebar,width=585,height=400");
}

function DeleteAllRows()
{
	for (var i=0;i<document.detail.length;i++)
	{
		var strField = document.detail[i].name;
		if( strField.indexOf('Delete_')!=-1 )
			document.detail.elements[strField].checked = document.detail.DeleteAll.checked;
		if(document.detail.DeleteAll.checked)
		{
			if( (strField.indexOf('Deliver_')!=-1) || (strField.indexOf('WL_')!=-1) )
				ClearRadios(document.detail.elements[strField]);
		}
	}
/*
	for(i=nFirst;i<=nSpam;i++)
	{
		var strDelete = 'Delete_' + i;
		document.detail.elements[strDelete].checked = document.detail.DeleteAll.checked;
		if(document.detail.elements[strDelete].checked) UncheckRadiobuttons(i);
	}
*/
}

function ClearForm()
{
	document.detail.DeleteAll.checked = false;
	for (var i=0;i<document.detail.length;i++)
	{
		var strField = document.detail[i].name;
		if( strField.indexOf('Delete_')!=-1 )
			document.detail.elements[strField].checked = false
		else if( (strField.indexOf('Deliver_')!=-1) || (strField.indexOf('WL_')!=-1) )
			ClearRadios(document.detail.elements[strField]);
	}
	return false;
}

function ClearDeleteButton(strField)
{
//	var strField = 'Delete_' + strId;
	document.detail.elements[strField].checked = false
}

function UncheckRadiobuttons(strId)
{
	var strField = 'Deliver_' + strId;
	ClearRadios(document.detail.elements[strField])
	strField = 'WL_Send_' + strId;
	ClearRadios(document.detail.elements[strField])
	strField = 'WL_Recip_' + strId;
	ClearRadios(document.detail.elements[strField])
//	document.detail.elements[strField].value = '';
}

function ClearRadios(radGroup)
{
   for (var i = 0; i < radGroup.length; i++)
   {
      radGroup[i].checked = false;
   }
}

function DefaultSettings()
{
	document.selections.SearchMethod.value = 0
	document.selections.SearchString.value = ''
	document.selections.SearchColumn.value = 'FromAddress'
	document.selections.action = "/user_spam_detail.aspx?Submit=yes&PageNo=1";
	document.selections.submit();
}
/*
function ClearForm(nSpam, nFirst)
{
	document.detail.DeleteAll.checked = false;
	for(i=nFirst;i<=nSpam;i++)
	{
		ClearDeleteButton(i);
		UncheckRadiobuttons(i);
	}
}
*/
function ChangeLinesPerPage()
{
//	alert(x);
//	document.selections.action = "/user_spam_detail.aspx?Submit=yes&PageNo=1&Username="+x;
	document.selections.submit();
}