
function Details(page,val) {
    document.cookie = 'page=' + page + '; path=/'
    document.cookie = 'val=' + val + '; path=/'
    document.sdetails.submit()
}

function backbutton() { document.sbackbutton.submit()}

function bodform() { document.bodyform.submit() }

function ebay() { document.sebay.submit() }

function Home() { document.sHome.submit()}

function logout() { document.slogout.submit() }

function MoreInfo() { document.sMoreInfo.submit()}

function Options() { document.soptions.submit()}

function other() { document.sother.submit() }

function preferred() { document.spreferred.submit()}

function profile() { document.sprofile.submit() }

function Reviews() { document.sReviews.submit()}

function searchagain() { document.sagain.submit()}

function searches() { document.ssearches.submit() }

function shistory() { document.sshistory.submit() }

function stores() { document.sstores.submit() }

function swishlist() { document.sswishlist.submit() }

function unloader() { document.cookie = 'mobile=FALSE; path=/' }

function wishlist() { document.wishadd.submit()}

function toggleShowBG(idname,state){
    bgdiv = document.getElementById(idname);
    if(state=="off"){
        bgdiv.style.visibility="hidden";
    }else if(state=="on"){
        bgdiv.style.visibility="visible";
    }
}

function barcodeFlyToSimLeft(){
   new Effect.Move('barcodeLeft',{x: -350, y: 200, mode: 'relative'});
   new Effect.Shrink('barcodeLeft',{direction: 'center', queue: 'end',
        afterFinish: function(){Barcode('043396097742');}});
   new Effect.Appear('barcodeLeft',{x: 0, y:0, duration: '1.0', queue: 'end'});
   return false;
}
function barcodeFlyToSimRight(){
    new Effect.Move('barcodeRight',{x: -500, y: 200, mode: 'relative'});
    new Effect.Shrink('barcodeRight',{direction: 'center', queue: 'end',
        afterFinish: function(){Barcode('043396097742');}});
    new Effect.Appear('barcodeRight',{x: 0, y:0, duration: '1.0', queue: 'end'});
   return false;
}

function usernamePlaceHolderToggle(direction){
    box = document.getElementById('newUserTextbox');
    if(direction == 'in' && box.value=='choose username'){
            box.value = '';
    }else if(direction == 'out' && box.value == ''){
        box.value='choose username';
    }
}

function gotoNewAccount(username){
    if(username.match(/^[a-zA-Z0-9]+$/)){
        window.location = "/Accounts/newAccount/" + username;
    }else if(username=='choose username'){
        alert('error: please enter a username');
    }else{
        alert('error: username must be alphanumeric');
    }
}