function setCopy(_sTxt){try{clipboardData.setData('Text',_sTxt)}catch(e){}}
function exist(s){return $(s)!=null;}

// 获得指定对象
function $(Obj) {
	return document.getElementById(Obj);
}

String.prototype.trim = function()
{
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

function ImageShow(objImage,BaseWidth,BaseHeight){
	var WidthDouble = objImage.width / BaseWidth;
	var HeightDouble= objImage.height / BaseHeight;
	if((objImage.width > BaseWidth) || (objImage.height > BaseHeight)){
		if(WidthDouble >= HeightDouble)
			objImage.width = BaseWidth;
		else
			objImage.height = BaseHeight;
	}
}

function iframeResize(FrameName,target)
{
	var dyniframe   = null;
	var indexwin    = null;

	if (document.getElementById)
	{
		dyniframe = eval(target).document.getElementById(FrameName);
		indexwin  = window;
		parentwin = parent;

		if (dyniframe)
		{
			if (dyniframe.contentDocument)
			{
				dyniframe.height = dyniframe.contentDocument.body.scrollHeight + 10;
			}
			else if (dyniframe.document && dyniframe.document.body.scrollHeight)
			{
				dyniframe.height=0;
				iframeheight = dyniframe.document.body.scrollHeight-84;
				windowheight = indexwin.document.body.scrollHeight;
				parentheight = parentwin.document.body.scrollHeight;
				dyniframe.height = (iframeheight < parentheight) ? windowheight : iframeheight;
			}
		}
	}
}