function MakeLogo(mfile)
{
    /* px,py 偏移量,fshow要显示的帧用|隔开*/
    var ashxfile
		ashxfile= "../ashx/Logo/" + mfile + ".ashx";
		var err = false;
	if ($('txtInput1')){
		if ($('txtInput1').value.length>20) {alert("抱歉，您输入的文字太多了"); err=true;}
		}
	if ($('txtInput2')){
		if ($('txtInput2').value.length>20) {alert("抱歉，您输入的文字太多了"); err=true;}
		}
	if (!err)
	{
		var param_url =  Form.serialize('form1');
		if ($('divbtn')) Form.disable('divbtn');
		//$('loading').style.display='';
		$('BtnMake').value = '请稍候...';
		new Ajax.Request(
                ashxfile,
                {
                        method: 'post',
                        postBody: param_url,
                        onComplete: function(response){
                            
                            if (response.responseText != "-1")
                            {
                                 Form.enable('divbtn');
								 MakeCallBack('ok',response.responseText);
                            }
							else
							{
								alert("抱歉，本次操作失败!");
								Form.enable('divbtn');
								$('loading').style.display='none';	
							}
                        }
                }
        ); 
	}
}
function MakeCallBack(type, mpic)
{

  // update the image source
  if (type == 'ok')
  {
	$('MakeImg').src = mpic;
	$('demoTab').style.display='none';
	$('demoTab2').style.display='none';
	$('BtnMake').value = '生成LOGO';
	//$('loading').style.display='none';
	$('BtnMake').disabled = true;
    $('BtnCopy').disabled = false;
    $('BtnSave').disabled = false;
	$('BtnReset').disabled = true;
	wait = 10;
	updateinfo();
  }
  else
    alert('抱歉，图片生成失败，请重新操作!');

}

// Reset the form
function MakeReset()
{
	$('MakeImg').src="../Material/Logo/" + $("Id").value + ".gif";
	$('demoTab').style.display = '';
	$('demoTab2').style.display = '';
  	$('BtnCopy').disabled = true;
  	$('BtnSave').disabled = true;

	$('BtnMake').disabled = false;
}

