// For Production Ad Link
var adlink = "http://ads.mindsgate.com/";

/*
// For Systest Ad Link
var adlink = "http://4.61.144.75/mams/";
*/

function showHome()
{
	document.location.href = h_ad;
}

function showSubscribe()
{
	document.location.href = "subscribe.asp";
}

function showForums()
{
	window.open("forum/","_blank");
}

function showRollTip(msg, e)
{
	if ( typeof RollTip == "undefined" || !RollTip.ready ) return;
	RollTip.reveal(msg, e);
}

function hideRollTip()
{
	if ( typeof RollTip == "undefined" || !RollTip.ready ) return;
	RollTip.conceal();
}

// No Numbers, No Special Characters but can have spaces - For First and Last Names
function filterNoSplBSpace(f)
{
	var res = new String();
	var num = "0123456789!@#$%^&*()~`-+={}[]\"':;?/>.<,\\_";
	var chars = f.value.split("");
	
	for(i=0; i<chars.length; i++)
	{
		if(num.indexOf(chars[i]) == -1)
			res += chars[i];
	}
	if(f.value != res)
		f.value = res;
}

function IsEmailAddress(s)
{
	re = /\s+/g
	if (re.test(s))
	{
		return false;
	}
	//validate email address syntax and remove any emails that don't 
	//match the basic syntax pattern below.
	re = /^(\w|[^_]\.|[\-])+((\@){1}([^_]))(([a-z]|[\d]|[\-]|\.)+|([^_]\.[^_])*)+\.[a-z]{2,6}$/i
	if (!re.test(s))
	{
		return false;
	}

	//fix the .. problem...
	re = /\.\./
	if (re.test(s))
	{
		return false;
	}

	//fix the @@ problem...
	re = /\@\@/
	return(!re.test(s));
}

function newsjumper(newsid,type,stype,source,user)
{
	var str = "upnewshits.asp?id="+ newsid +"&type="+ type +"&stype="+ stype +"&source="+ source +"&user="+ user;
	window.open(str,"_blank");
}

function cMsg()
{
	//window.open("http://www.saroots.com/contact.asp","_blank");
	window.open("http://ads.mindsgate.com/mpratecard.pdf","_blank");
}

function showMagic(zone)
{
	var link = adlink + "GetRandAd.asp?zid="+zone;
	supercode = "<iframe src=\""+ link +"\" width=468 height=60 noresize scrolling=no hspace=0 vspace=0 frameborder=0 marginheight=0 marginwidth=0></iframe>";
	//alert(str);
	document.write(supercode);
}
