function updateseccode(width, height,tips) {
	if(!tips) {
	$('seccodeimg').innerHTML = '<img id="seccode" onclick="updateseccode()" width="' + seccodedata[0] + '" height="' + seccodedata[1] + '" src="/capcha.php?rnd=' + Math.random() + '" style="cursor:pointer;" alt="" /><em class="tips"> '+unescape('%u5982%u679C%u770B%u4E0D%u6E05%u9A8C%u8BC1%u7801%uFF0C%u8BF7%u70B9%u56FE%u7247%u5237%u65B0')+'</em>';
	}else {
	$('seccodeimg').innerHTML = '<img id="seccode" onclick="updateseccode('+width+','+height+','+tips+')" width="' + seccodedata[0] + '" height="' + seccodedata[1] + '" src="/capcha.php?rnd=' + Math.random() + '" style="cursor:pointer;" alt="" />';
	}
}
function formToRequestString(form_obj)
{
    var query_string='';
    var and='';
    for (var i=0;i<form_obj.length ;i++ )
    {
        e=form_obj[i];
        
        if (e.name) {
            if (e.type=='select-one') {
                element_value=e.options[e.selectedIndex].value;
            } else if (e.type=='select-multiple') {
                for (var n=0;n<e.length;n++) {
                    var op=e.options[n];
                    if (op.selected) {
                        query_string+=and+e.name+'='+encodeURIComponent(op.value);
                        and="&"
                    }
                }
                continue;
            } else if (e.type=='checkbox' || e.type=='radio') {
                if (e.checked==false) {   
                    continue;   
                }   
                element_value=e.value;
            } else if (typeof e.value != 'undefined') {
                element_value=e.value;
            } else {
                continue;
            }
            query_string+=and+e.name+'='+encodeURIComponent(element_value);
            and="&"
        }

    }
    return query_string;
}
function addBookmark(title,url) {
if (window.sidebar && "object" == typeof( window.sidebar ) && "function" == typeof( window.sidebar.addPanel ) ) { 
window.sidebar.addPanel(title, url,""); 
} else if(document.all) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}

function removescript(s) {
	return s.replace(/<script.*?>.*?<\/script>/ig, '');
}