function newTabByTxt(txt,activate)
{
	var chr=txt.charAt(0);
	if(chr!="f"&&chr!="h"){
		var scheme=txt.substr(0,4);
		var colon=txt.indexOf(":");
		if(-1!=scheme.indexOf("s")){
			txt="https"+txt.substr(colon);
		}else{
			txt="http"+txt.substr(colon);
		}
	}
	App.NewTab(txt,activate);
}
var txt=App.clipboard.getData("TEXT");
if(txt&&txt.length){
	var re=/(https?|ttps?|tps?|ps?|s?|ftp):\/\/[A-z0-9$-_.+!*'(),\;\/?:@&=%~]+/g;
	var activate=null;
	while(true){
		var ret=re.exec(txt);
		if(! ret){
			break;
		}
		newTabByTxt(ret[0],activate);
		activate=false;
	}
}