// JavaScript Document
function Link_onmouseover(event,InfoBlockID,KeyWords,ContType){
	document.getElementById(InfoBlockID).style.display="block";
	if(!document.all){
        mouse_x=event.pageX;
        mouse_y=event.pageY;
    }else{
        mouse_x=document.documentElement.scrollLeft+event.clientX;
        mouse_y=document.documentElement.scrollTop+event.clientY;
		document.getElementById(InfoBlockID).style.left=mouse_x;
		document.getElementById(InfoBlockID).style.top=mouse_y;
    }
    var webFileUrl = "/Inc/GetCont.aspx?KeyWords="+KeyWords+"&ContType=" + ContType;
　　var result = "";
　　var xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
　　    
　　xmlHttp.open("POST", webFileUrl, false);
　　xmlHttp.send("");

　　result = xmlHttp.responseText;
　　if(result != "")
　　{
    　　document.getElementById(InfoBlockID).innerHTML=result;
　　}
}

function Link_onmouseout(event,InfoBlock){
	//window.setTimeout("InfoBlock_H(event,'"+InfoBlock+"')",20000);
}

function InfoBlock_H(event,InfoBlock){
	document.getElementById(InfoBlock).style.display="none";
}

function Link_Add(ContID,ContType,InfoBlockID){
	var Cont=document.getElementById(ContID).innerHTML;
	var webFileUrl = "/Inc/GetKeyWords.aspx?ContType=" + ContType;
　　var result = "";
　　var xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
　　    
　　xmlHttp.open("POST", webFileUrl, false);
　　xmlHttp.send("");

　　result = xmlHttp.responseText;
　　if(result != "")
　　{
		var piArray_IN;
		var piArray = result.split("|");
		for(var i=0;i<piArray.length-1;i++){
    		piArray_IN=piArray[i].split("#");
    		if(piArray_IN[1]==null||piArray_IN[1]=="")
    		{
    		    Cont=Cont.replace(piArray_IN[0],"<a href=\"#\" style=\"cursor:hand;\" onmouseover=\"Link_onmouseover(event,'"+InfoBlockID+"','"+piArray_IN[0]+"','"+ContType+"')\" onmouseout=\"Link_onmouseout(event,'"+InfoBlockID+"')\">"+piArray_IN[0]+"</a>");
    		    document.getElementById(ContID).innerHTML=Cont;
    		}
    		else
    		{
        		Cont=Cont.replace(piArray_IN[0],"<a href=\""+piArray_IN[1]+"\" style=\"cursor:hand;\" >"+piArray_IN[0]+"</a>");
    		    document.getElementById(ContID).innerHTML=Cont;
    		}
		}
	}
}
