function click2call(buttonid, params){
  paramsstring = ""
  if(typeof params == "undefined"){
    //alert("no params")
  }else{
    paramsstring = $j.toJSON(params, true)
    //alert(paramsstring)
    paramsstring = encodeURI(paramsstring)

  }

  tb_show("", "http://sisc2c.vptt.ch/api/avanex/"+buttonid+"/"+paramsstring+"?keepThis=true&height=435&width=271&modal=false&TB_iframe=true", false);

}

function clickoffline(lang){
  tb_show("", "http://sisc2c.vptt.ch/api/avanex/offline/"+lang+"?keepThis=true&height=435&width=271&modal=false&TB_iframe=true", false);
}

//http://code.google.com/p/jquery-json/
var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;
var meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};

$j.quoteString=function(string){if(escapeable.test(string)){return'"'+string.replace(escapeable,function(a)
{var c=meta[a];if(typeof c==='string'){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
return'"'+string+'"';};


$j.toJSON=function(o,compact)
{var type=typeof(o);if(type=="undefined")
return"undefined";else if(type=="number"||type=="boolean")
return o+"";else if(o===null)
return"null";if(type=="string")
{return $j.quoteString(o);}
if(type=="object"&&typeof o.toJSON=="function")
return o.toJSON(compact);if(type!="function"&&typeof(o.length)=="number")
{var ret=[];for(var i=0;i<o.length;i++){ret.push($j.toJSON(o[i],compact));}
if(compact)
return"["+ret.join(",")+"]";else
return"["+ret.join(", ")+"]";}
if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.");}
var ret=[];
for(var k in o){
var name;type=typeof(k);if(type=="number")
name='"'+k+'"';else if(type=="string")
name=$j.quoteString(k);else
continue;var val=$j.toJSON(o[k],compact);if(typeof(val)!="string"){continue;}
if(compact)
ret.push(name+":"+val);
else
ret.push(name+": "+val);
}
return"{"+ret.join(", ")+"}";};



