function showDialog(page,args,width,height){
	return window.showModalDialog(page,args,"dialogHeight: " + height + "px; dialogWidth: " + width + "px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: Yes; status: No;");
}

// 增加一个名为 trim 的函数作为
// String 构造函数的原型对象的一个方法。
String.prototype.trim = function()
{
    // 用正则表达式将前后空格
    // 用空字符串替代。
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

function window.strReplace(str,bestr,tostr){
    while(str.indexOf(bestr) != -1){
        str = str.replace(bestr,tostr);
    }
    return str;
}
//密码提示问题
function writeQuestionList(name,selected){
    var str = "<select name='"+name+"'>";
        if (selected == '宝宝家长名字'){
          str += "<option value='宝宝家长名字'  selected >宝宝家长名字</option>";
        }else{
          str += "<option value='宝宝家长名字' >宝宝家长名字</option>";
        }
        if (selected == '宝宝出生地'){
           str += "<option value='宝宝出生地'  selected >宝宝出生地</option>";
        }else{
          str += "<option value='宝宝出生地' >宝宝出生地</option>";
        }
        if (selected == '宝宝小名'){
           str += "<option value='宝宝小名'  selected >宝宝小名</option>";
        }else{
          str += "<option value='宝宝小名' >宝宝小名</option>";
        }
        if (selected == '其他'){
           str += "<option value='其他'  selected >其他</option>";
        }else{
          str += "<option value='其他' >其他</option>";
        }
		str +='</select>'; 	                        
    document.write(str);
}