//reseller fnctns


if (document.images){
	status_open = new Image();
	status_close = new Image();
	status_open.src = "https://imagesak.securepaynet.net/aaa/sb/bul_open.gif";
	status_close.src = "https://imagesak.securepaynet.net/aaa/sb/bul_close.gif";}
	
function gosb(url,t){
	if(t == "")t="_self";
	window.open(url,t);
}
function sbStatus(){
	var dpClosed = false;
	var item = new Array("qs","mc","ma","s","e","rp","b"); //sidebar open/close
	for(x=0;x<item.length;x++){
		if(getCookie('sidebar_' + item[x]) == "1")
		{
			if(document.images [item[x]+"_img"]) document.images [item[x]+"_img"].src = status_close.src;
			if(document.getElementById(item[x]+'_div')) document.getElementById(item[x]+'_div').style.display = "";
			if((item[x]=="ma")||(item[x]=="s"))
			{
				dpClosed = true;
			}
		}
	}


	var item = new Array("customize","test");//landing page open/close
	for(x=0;x<item.length;x++){
		if(getCookie('sidebar_' + item[x]) == "1")
		{
			if (document.images [item[x]+"_img"])
			{
				document.images [item[x]+"_img"].src = status_open.src;
				document.getElementById(item[x]+'_div').style.display = "none";
			}
		}
	}
}
function togSB(item){
	if(document.images [item+"_img"])	document.images [item+"_img"].src = (document.images [item+"_img"].src == status_open.src) ? status_close.src:status_open.src;
	document.getElementById(item+'_div').style.display = (document.getElementById(item+'_div').style.display=="none") ? "":"none";

	if(getCookie('sidebar_' + item) == "1")
	{
		eraseCookie('sidebar_' + item);
		if((document.getElementById('dp_divB'))&&(getCookie('sidebar_ma') != "1")&&(getCookie('sidebar_s') != "1"))
		{
			document.getElementById('dp_divB').style.display = "";
		}
	}
	else
	{
		createCookie('sidebar_' + item,1,'');
		if((document.getElementById('dp_divB'))&&((getCookie('sidebar_ma') == "1")||(getCookie('sidebar_s') == "1")))
		{
			document.getElementById('dp_divB').style.display = "none";
		}
	}
}


function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function getCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name)
{
	createCookie(name,"",-1);
}

function editSBselected(theForm, theVal, theDomain)
{
	if (theVal)
	{
		theForm.searchSBselected.value = theForm.searchSBselected.value + '|' + theDomain + '|'
	}
	else
	{
		var theStr = theForm.searchSBselected.value;
		theStr = theStr.replace('|' + theDomain + '|', '');
		theForm.searchSBselected.value = theStr
	}
}

function checkSBDomain(searchForm)
{
	var canSubmit = false;
	var searchValue;
	if ('' == '' && searchForm.domainToCheck)
	{
		searchValue = searchForm.domainToCheck.value;
		if (searchValue != '')
		{
			var regExInvalidChars = /[^a-zA-Z0-9-\s.]+/;
			if (regExInvalidChars.test(searchValue))
			{
				alert('Invalid character in domain.\n\nOnly letters, numbers or hyphens are allowed.')
			}
			else
			{
			canSubmit = true;
			}
		}
	}
	if (canSubmit) 
	{
	
		return true;
	
	}
	else
	{
		return false;
	}
}


<!--
function popPage(pagename, cici, progid, apphdr)
{
	var pgurl = 'se=%2B&prog%5Fid=319509&app%5Fhdr=0&ci=cici';
	pgurl = pgurl.replace('cici', cici);
	if (progid != '')
	{
		pgurl = pgurl.replace('319509', progid);
	}
	if (apphdr != '')
	{
		pgurl = pgurl.replace('hdr=0', 'hdr=' + apphdr);
	}
	if (pagename.indexOf('?') <= 0)
	{
		pgurl = '?' + pgurl
	}
	else
	{
		pgurl = '&' + pgurl
	}
	if ((pagename.indexOf('http://') < 0)&&(pagename.indexOf('https://') < 0))
	{
		pgurl = ('https://www.securepaynet.net/gdshop/' + pagename + pgurl);
	}
	else
	{
		pgurl = (pagename + pgurl);	
	}
	var win=window.open(pgurl, 'spop', 'left=20,top=20,resizable=yes,scrollbars=yes,width=610,height=620');
}
function popAnchor(pagename, cici, anchor)
{
	var pgurl = 'se=%2B&prog%5Fid=319509&app%5Fhdr=0&ci=cici';
	pgurl = pgurl.replace('cici', cici);
	if (pagename.indexOf('?') <= 0)
	{
		pgurl = '?' + pgurl
	}
	else
	{
		pgurl = '&' + pgurl
	}
	if ((pagename.indexOf('http://') < 0)&&(pagename.indexOf('https://') < 0))
	{
		pgurl = ('https://www.securepaynet.net/gdshop/' + pagename + pgurl);
	}
	else
	{
		pgurl = (pagename + pgurl);	
	}
	if (anchor != '')
	{
		pgurl = pgurl + '#' + anchor
	}
	var win=window.open(pgurl, 'spop', 'left=20,top=20,resizable=yes,scrollbars=yes,width=610,height=620');
}
function popFaq(article_id)
{
	var faqurl = 'http://help.securepaynet.net/article.php?se=%2B&prog%5Fid=319509&app%5Fhdr=0&article%5Fid=fff';
	faqurl = faqurl.replace('fff', article_id);
	var win=window.open(faqurl, 'spop', 'left=20,top=20,resizable=yes,scrollbars=yes,width=610,height=620');
}
function popFaqTopic(topic_id)
{
	var faqurl = 'http://help.securepaynet.net/article_list.php?se=%2B&prog%5Fid=319509&app%5Fhdr=0&topic%5Fid=fff';
	faqurl = faqurl.replace('fff', topic_id);
	var win=window.open(faqurl, 'spop');
}

//for abandon popup
var internal_clicked = false;	
function processLinks()
{
  //set internal_clicked on all links
  var links = document.getElementsByTagName("A");
  for (var i=0; i < links.length; i++)
  {
    links[i].onclick = function(){internal_clicked = true;}
  }
  //set internal_clicked on all form submits
  var forms = document.getElementsByTagName("FORM");
  for (var i=0; i < forms.length; i++)
  {
    forms[i].onsubmit = function(){internal_clicked = true;}
  }
}

function abandonWin()
{
	if (!internal_clicked) //show abandon popup
	{
		var target = "_abandon";		
		var url = "https://www.securepaynet.net/gdshop/jump_pages/abandon.asp?se=%2B&prog%5Fid=319509&app%5Fhdr=99&location=locationurl";
		var loc = document.location.href;
		loc += (loc.indexOf('?') > 0) ? "&":"?";
		if (loc.indexOf('domainToCheck') < 1) loc += "domainToCheck=&tld=&checkAvail=&currStep="
		loc = passedURLEncode(loc);
		url = url.replace('locationurl', loc);		
		var winWidth = 400;
		var winHeight = 340;
		var options = "resizable=0,scrollbars=0,status=0,location=0,menubar=0,toolbar=0,";
		options += "width=" + winHeight + ",";
		options += "height=" + winHeight + ",";
		options += "screenY=" + ((screen.availHeight - winHeight) /2) + ",";
		options += "top=" + ((screen.availHeight - winHeight) /2) + ",";
		options += "screenX=" + ((screen.availWidth - winWidth) /2) + ",";
		options += "left=" + ((screen.availWidth - winWidth) /2) + ",";
		var win = window.open(url,target,options); win.focus();
	}
}
function passedURLEncode(str)
{
	str = str.replace(/\?/g,"!");
	str = str.replace(/=/g,"^");
	str = str.replace(/&/g,"$");
	return str;
}
//-->


var agt=navigator.userAgent.toLowerCase();
var is_safari = agt.indexOf("safari")!=-1;
function mainovr(div,name,status){
	if(is_safari){
		bHover=name; Act(div,name,false);window.status=status;}
	else{
		bHover=name;window.status=status;setTimeout('Act(\'' + div + '\', \'' + name + '\', false)',400);}
}
function findDiv(n, d) { 
	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=findDiv(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function tNav() { 
	var i,p,v,obj,args=tNav.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findDiv(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    if(v=='visible')setPosition(args[i]);    
    obj.visibility=v;} 
}
function hde(sect) {
  tNav('dom','','hide');tNav('host','','hide');tNav('sslhdr','','hide');tNav('em','','hide');tNav('eco','','hide');tNav('webs','','hide');showElement('SELECT');
}
function hideDD(sect) {
  tNav(sect,'','hide');hde(sect);
}
var secSet = null;
var activeTimer = null;
var bHover = '';
function Act(sect, windowStatusVal, bshow) {
	hde(sect);
	if ((bHover==windowStatusVal)||(bshow)){		
		tNav(sect,'','show');
		if (secSet != null) window.clearTimeout(secSet);		
		hideElement('SELECT', document.all[sect]); 
	}
}
function setPosition(sect)
{
  var obj, objstyle, overobj, len=0;
  overobj=findDiv(sect+"_td");
  obj=findDiv(sect);
  if (eval(overobj.offsetLeft+obj.offsetWidth) > overobj.offsetParent.offsetWidth){
	len = eval(overobj.offsetLeft+obj.offsetWidth)-overobj.offsetParent.offsetWidth;}
  if (obj.style) { objstyle=obj.style;
  objstyle.left = overobj.offsetLeft-len;}
}
function Tim(sect){
	if (secSet != null) window.clearTimeout(secSet);
	secSet = window.setTimeout('hideDD("' + sect + '")',500);
}

function hideElement( elmID, overDiv ) {
  if(document.all) {
    for(i = 0; i < document.all.tags( elmID ).length; i++) {
      obj = document.all.tags( elmID )[i];
      if(!obj || !obj.offsetParent) continue;
      // Find the element's offsetTop and offsetLeft relative to the BODY tag.
      objLeft   = obj.offsetLeft - overDiv.offsetParent.offsetLeft;
      objTop    = obj.offsetTop;
      objParent = obj.offsetParent;
      while(objParent.tagName.toUpperCase() != 'BODY') {
        objLeft  += objParent.offsetLeft;
        objTop   += objParent.offsetTop;
        objParent = objParent.offsetParent;}
      objHeight = obj.offsetHeight;
      objWidth  = obj.offsetWidth;            
      if((overDiv.offsetLeft + overDiv.offsetWidth) <= objLeft);
      else if((overDiv.offsetParent.offsetTop + overDiv.offsetHeight + 50) <= objTop);
      else if(overDiv.offsetTop >= eval(objTop + objHeight));
      else if(overDiv.offsetLeft >= eval(objLeft + objWidth));
      else {
        obj.style.visibility = 'hidden';
      }
    }
  }
}

function showElement(elmID) {
  if(document.all) {
    for(i = 0; i < document.all.tags( elmID ).length; i++) {
      obj = document.all.tags(elmID)[i];
      if(!obj || !obj.offsetParent) continue;
      obj.style.visibility = '';
    }
  }
}

function blogInfoPopup()
													{
														window.open('https://www.securepaynet.net/gdshop/jump_pages/blog_info.asp?se=%2B&prog%5Fid=319509&app%5Fhdr=99', 'blog', 'left=20,top=20,scrollbars=yes,resizable=yes,width=600,height=500');
													}
													
function openAdSupportedPopup()
													{
													var win=window.open('https://www.securepaynet.net/gdshop/jump_pages/adsupported.asp?se=%2B&prog%5Fid=319509&app%5Fhdr=99', 'adsup', 'left=50,top=50,resizable=yes,scrollbars=yes,width=250,height=170');
													}
													//-->
						

function openWarrantyPopup()
{
	var win=window.open('https://www.securepaynet.net/gdshop/popup.asp?se=%2B&prog%5Fid=319509&display=warranty', 'display1', 'left=50,top=50,resizable=yes,scrollbars=yes,width=350,height=200');
}
													
function openICANNPopup()
{
	var win=window.open('https://www.securepaynet.net/gdshop/jump_pages/icann_dry.asp?se=%2B&prog%5Fid=319509&app%5Fhdr=99', 'icann', 'left=50,top=50,resizable=yes,scrollbars=yes,width=400,height=250');
}													

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

