var h_=new Image();
var h=new Image();
h.src='/images/home.gif';
h_.src='/images/home_.gif';
function SelectText(elm){
	var p=Pos(elm);
	var input=document.createElement('INPUT');
	input.value=elm.firstChild.nodeValue;
	input.style.position="absolute";
	input.style.top=p.y+'px';
	input.style.left=p.x+'px';
	input.style.width=p.w+'px';
	input.style.margin='0';
	input.style.padding='1px';
	input.style.borderStyle='none';
	input.style.borderWidth='0';
	input.id='wwptburl';
	document.body.appendChild(input);
	input.focus();
	input.select();
	if(document.body.addEventListener){
		document.body.addEventListener('click', DeleteText, false);
	}else if(document.body.attachEvent){
		document.body.attachEvent('onclick',DeleteText);
	}
}
function DeleteText(e){
	e=e||window.event;
	var tar=e.target||e.srcElement;
	if(tar.id=='wwptburl'){
		return;
	}
	document.body.removeChild(document.getElementById('wwptburl'));
	if(document.body.removeEventListener){
		document.body.removeEventListener('click',DeleteText,false);
	}else if(document.body.detachEvent){
		document.body.detachEvent('onclick',DeleteText);
	}
}

/*function MAX() {var mx=0;for(var i=0;i<arguments.length;i++){if(isNaN(arguments[i]))continue;if(mx<arguments[i]){mx=arguments[i];}}return mx;}
function GetStyle(el, prop){
	if(el.style[prop]){
		return el.style[prop];
	}else if (document.defaultView && document.defaultView.getComputedStyle){
		prop = prop.replace(/([A-Z])/g, "-$1");
		prop = prop.toLowerCase();
		return document.defaultView.getComputedStyle(el,"").getPropertyValue(prop);
	}else if (el.currentStyle){
		return el.currentStyle[prop];
	}else{
		return null;
	}
}
function Pos(el){
var pos={x:0,y:0,w:0,h:0};
	if(el.getBoundingClientRect){
		var rect=el.getBoundingClientRect();
		var top=rect.top+MAX(document.body.scrollTop,document.documentElement.scrollTop,window.scrollY,document.body.scrollTop);
		var left=rect.left+MAX(document.body.scrollLeft,document.documentElement.scrollLeft,window.scrollX,document.body.scrollLeft);
		var width=rect.right-rect.left;
		var height=rect.bottom-rect.top;
		pos={x:left,y:top,w:width,h:height};
	}else if(document.getBoxObjectFor){
		var rect=document.getBoxObjectFor(el);
		var top=rect.y-MAX(parseInt(GetStyle(el, "borderTopWidth")),0);
		var left=rect.x-MAX(parseInt(GetStyle(el, "borderLeftWidth")),0);
		var width=MAX(rect.width,el.clientWidth);
		var height=MAX(rect.height,el.clientHeight);
		pos={x:left,y:top,w:width,h:height};
	}else{
		var platform=navigator.platform.toLowerCase();
		isMac=(platform.indexOf("mac")!=-1);
		pos.w=el.clientWidth;
		pos.h=el.clientHeight;
		while (el) {
			pos.x += parseInt(el.offsetLeft);
			pos.y += parseInt(el.offsetTop);
			el = el.offsetParent;
		}
		pos.x-=document.body.offsetLeft; // -1* html margin-left
		pos.y-=document.body.offsetTop; // -1* html margin-top
		if (isMac){
			pos.x+=document.body.offsetLeft;
			pos.y+=document.body.offsetTop;
		}
	}
	return pos;
}*/
