function click2call(buttonid, params){
  
  var lang;
  
  if(typeof params== "undefined"){
    lang = "de"
  } else {
    lang = params.alang;
  }

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

  $j.ui.dialog.defaults.bgiframe = true;
	$j(function() {
		$j("#c2c_dialog").dialog({
		  autoOpen: false,
                  bgiframe: true,
                  height: 400,
		  width: 295,
                  modal: false,
		  resizable: false,
		  title: ' ',
		  dialogClass: 'scs'
                  });
	});
    
  var classname = "c2c_header_" + lang;
  
  $j(".ui-widget-content").removeClass('c2c_header_de c2c_header_fr c2c_header_it c2c_header_en');
  $j(".ui-widget-content").addClass(classname);
	
   $j("#c2c_dialog").html('<iframe id="modalIframeId" width="100%" height="100%" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto" />').dialog("open");
   $j("#modalIframeId").attr("src","http://siswave.vptt.ch/api/xmedia/"+buttonid+"/"+paramsstring);
   //alert("http://sisc2ctesting.vptt.ch/api/hessnatur/"+buttonid+"/"+paramsstring);
   return 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(", ")+"}";};


