function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+";path=/"+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function tab(switchon) {
    switchon += '';
    if(document.getElementById('content1')!=null) document.getElementById('content1').className='backTab';
    if(document.getElementById('content2')!=null) document.getElementById('content2').className='backTab';
    if(document.getElementById('tab1')!=null) document.getElementById('tab1').className='tab';
    if(document.getElementById('tab2')!=null) document.getElementById('tab2').className='tab';
    document.getElementById('content'+switchon).className='frontTab';
    document.getElementById('tab'+switchon).className='tabhigh';
    if(switchon==1) setCookie("SL_PayID",1,365);
    if(switchon==2) setCookie("SL_PayID",2,365);
}
