

function BtnOver(btn)
{
  btn.style.borderTopColor="#efece8";
  btn.style.borderBottomColor="#888070";
  btn.style.borderLeftColor="#efece8";
  btn.style.borderRightColor="#888070";
}
function BtnClick(btn)
{
  btn.style.borderTopColor="#888070";
  btn.style.borderBottomColor="#efece8";
  btn.style.borderLeftColor="#888070";
  btn.style.borderRightColor="#efece8";
}
function BtnOut(btn)
{
  btn.style.borderColor="#d9cec4";
}

function LyShowModalDialog(strURL,intHeight,intWidth){
  var strFeatures;
  var retValue;

  strFeatures="dialogheight:" + intHeight + "px;dialogwidth:" + intWidth + "px;center:yes;";
  retValue=window.showModalDialog(strURL,"",strFeatures);
  //retValue=window.open(strURL,"",strFeatures);  
  return retValue;
}

function CallInsertImage(obj,strQS){
  var strURL="lms10Ifram.aspx?lms10_imgcls=2" //+ strQS;
  var strValue;
  var inti;
  var arytemp;

  strValue = LyShowModalDialog(strURL,550,650);
  //if ((strValue == null) || (trim(strValue) == ""))
    //strValue="";
    
  strValue += '';
 
  if (strValue != 'undefined')
  {
	arytemp=strValue.split("\x01");
	//if (trim(strValue) != "")
	strValue='<img border=0 src="' + arytemp[1] + '">';

	sel = obj.document.selection.createRange();
	sel.pasteHTML(strValue);

	//sel.pasteHTML("<img src='http://aaa.com.tw/ddd.gif'>");
	//for (inti=0;inti<arytemp.length-1;inti=inti+2)
	//{
		//alert(arytemp[inti] + '=' + arytemp[inti+1]);
	// obj.document.body.innerHTML=obj.document.body.innerHTML + strValue;
	//}
  }
}

function CallInsertWebLink(obj,objp,strQS){
  var strURL="/LyEDM/SingleSelectIfram.aspx?" + strQS;
  var strValue;
  var inti;
  var arytemp;
  var myObject = new Object();
  myObject.ThisValue = obj.value;

//alert(  myObject.ThisValue );
  var strFeatures;
  var intHeight=550;
  var intWidth=450;
     
  strFeatures="dialogheight:" + intHeight + "px;dialogwidth:" + intWidth + "px;center:yes;";
  strValue = window.showModalDialog(strURL,myObject,strFeatures);  
  //window.open(strURL,'')
  
  
//alert(strValue);
  //strValue = LyShowModalDialog(strURL,550,450);
  //if ((strValue == null) || (trim(strValue) == ""))
    //strValue="";
    
  strValue += '';  
  
  //alert(strValue);
  if (strValue != 'undefined')
  {
	arytemp=strValue.split("\x01");
	//if (trim(strValue) != "")
		strValue='show.aspx?show=' + arytemp[1];
	    
		//alert(strValue);
	//alert(strValue);
	//sel = obj.document.selection.createRange();
	//sel.pasteHTML(strValue);
	  
	objp.document.execCommand('CreateLink',false,strValue);
	//sel.pasteHTML("<img src='http://aaa.com.tw/ddd.gif'>");
	//for (inti=0;inti<arytemp.length-1;inti=inti+2)
	//{
		//alert(arytemp[inti] + '=' + arytemp[inti+1]);
	// obj.document.body.innerHTML=obj.document.body.innerHTML + strValue;
	//}
  }
}
