function goStores(url)
{
	document.location='stores/'+url;
}
function goSection(url)
{
	document.location=url;
}

function tab(num)
{
	document.getElementById("tab-c").style.display='none';
	document.getElementById("tab-j").style.display='none';
	document.getElementById("tab-a").style.display='none';
	
	document.getElementById("tabnav-c").className='';
	document.getElementById("tabnav-j").className='';
	document.getElementById("tabnav-a").className='';
	
	document.getElementById("tab-"+num).style.display='';
	document.getElementById("tabnav-"+num).className='open';
	
}

function fFocus(o)
{if (o.alt==o.value){o.value='';}}
function fBlur(o)
{if (o.value==''){o.value=o.alt;}}

var xh=false;
function $(o){return document.getElementById(o);}
function d(o,p){return $(o).style.display=p;}

function initxh() {
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	try {xh = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {try {xh = new ActiveXObject("Microsoft.XMLHTTP");} catch (E) {xh = false;}}
	@end @*/
	if (!xh && typeof XMLHttpRequest!='undefined') {try {xh = new XMLHttpRequest();} catch (e) {xh=false;}}
	if (!xh && window.createRequest) {try {xh = window.createRequest();} catch (e) {xh=false;}}
}

function signup() {
	xh.open("GET", "/sv/signup.php?inputEmail="+$('signupemail').value,true);
	xh.onreadystatechange=function() {
		if (xh.readyState==4) {
    		if (xh.responseText=="ok") {thankyou();}
    		if (xh.responseText=="err") {createError();}
 			}
 		}
	xh.send(null)
}
function thankyou()
{
	$('signupnotify').innerHTML='Thank you.';
	$('signupemailarea').innerHTML='';

}

function createError()
{ 
	$('signupnotify').innerHTML='Error in your e-mail, please re-type.';

}
 
function fType(field)
{
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(field.value)) {field.style.borderColor='#000000';}
	else {field.style.borderColor='#FF0000';}
}
