function  dSetupClass(){
	var out=objAjax.getText("post","../webos/deskTopServer.aspx?type=readDeskTopPar",null,null);
	var deskTopSet=comminute(out,c1,c2);
	
	
	this.loadImg=function(){
		fileList.onchange=function(){
			
			if (this.value!="no"){
				selectFile.value="deskTopImg/"+this.value;
				demoimg.src=selectFile.value;
				demoimg.style.display="";
			}else{
				selectFile.value="no";
				demoimg.style.display="none";
			}
		}
		
		
		var out=objAjax.getText("post","../webos/deskTopServer.aspx?type=readImglist",null,null);
		out=out.split(c1);
		if (out.length<1){
			alert(erStr(out.toString()));
			return;
		}
		for (var i=0;i<out.length-1;i++){
			var opt=document.createElement("option");
			opt.text=out[i];
			opt.value=out[i];
			fileList.options.add(opt);
		}
		
		selectColor.value=deskTopSet[2][1];
		selectFile.value=deskTopSet[0][1];
		//alert(deskTopSet[1][1]);
		selectoption(bgimgType,deskTopSet[1][1]);
		var fname=deskTopSet[0][1].split("/");
		fname=fname[1];
		
		if (deskTopSet[0][1]!="" &deskTopSet[0][1]!="no"){
			demoimg.src=deskTopSet[0][1];
			demoimg.style.display="";
			selectoption(fileList,fname);
		}else{
			selectoption(fileList,deskTopSet[0][1]);
		}
		demoColor.style.backgroundColor=deskTopSet[2][1];
		demoDiv.style.backgroundColor=deskTopSet[2][1];

		
	}
	
	this.upFile=function(){
		var photo=openUpfile(9);
		if (photo!=null){
			photo=photo.split(c1);
			selectFile.value=photo[0];
			demoimg.src=photo[0];
			demoimg.style.display="";
		}		
	}
	
	this.selectColor=function(){
		var c=openSelectColor();
		if (c!=null){
			selectColor.value=c;
			demoColor.style.backgroundColor=c;
			demoDiv.style.backgroundColor=c;
		}
	}
	
	
	this.useSetup=function(){  //在桌面上应用当前设置
		var obj=parent.document.getElementById("deskTop_1");
		if (selectColor.value!=""){
			obj.style.backgroundColor=selectColor.value;
		}
		
		if (selectFile.value=="no" | selectFile.value==""){
			obj.style.backgroundImage="none";
		}else{
			obj.style.backgroundImage="url('"+selectFile.value+"')";
			if (bgimgType.value=="0"){
				obj.style.backgroundPositionX="center";
				obj.style.backgroundPositionY="center";
				obj.style.backgroundRepeat="no-repeat";
			}
		}
	}
	
	this.save=function(){ //保存当前设置的参数
		var objResponse=new JHttpResponse();
		objResponse.write("bgimg",selectFile.value);
		objResponse.write("bgimgtype",bgimgType.value);
		objResponse.write("bgcolor",selectColor.value);
		var out=objAjax.getText("post","../webos/deskTopServer.aspx?type=saveDesktopPar",objResponse,null);
		if (out=="OK"){
			return true;
		}else{
			alert(erStr(out));
			return false;
		}
	}
	
	this.apply=function(){
		this.useSetup();
		this.save();
	}
	
	this.confirm=function(){
		this.useSetup();
		this.save();
		closeWindow();		
	}
	
}