function get_val(url,key) {
var two= url.split("?");
var right= two[1];
var values = right.split("&");
var ret = '';
for(var i = 0; i < values.length; i++ )
{
var one= values[i];
var val=one.split("=");
if(val.length <= 1) continue;
if(val[0] ==key) ret =val[1];
}
return ret;
}