﻿// JScript File
function checkTextValue(textValue,maxLength)
{
    if(textValue.length>maxlength)
    {
        return "1";
    }
    
    var filterCode="a|b|c";
    var filterArr=filterCode.split("|");
    for(var i=0;i<filterArr.length;i++)
    {    
        if(textValeu.indexOf(filterArr[i])>0)
        {
            return "2";
        }
    }
    
    return "0";
}


			                        
function saveOrder(order,viewtype)
{
    var myCookie = new CookieClass();
    myCookie.setCookie("TL_sortby", order)
    myCookie.setCookie("TL_viewby", viewtype); ;
    //myCookie.showCookie();
    document.getElementById("msgSaveSetting").style.display = "block";
}			                        

function GotoBookDeatils(category)
{
    var myCookie = new CookieClass();
    if(myCookie.getCookie("TL_viewby")!="Cover")
    {
        window.location="book_details.asp?category="+category;
    }
    else
    {
        window.location="tumblenow.asp?category="+category;
    }
}

function GotoNewBookDeatils(category)
{
    var myCookie = new CookieClass();
    if(myCookie.getCookie("TL_viewby")!="Cover")
    {
        window.location="newbook_details.asp?category="+category;
    }
    else
    {
        window.location="newbooktumblenow.asp?category="+category;
    }
}