function fncGetPage(pageURL){
	xmlhttp = createXMLHttp();
	if(xmlhttp){
		strReturnValue = null;
		xmlhttp.onreadystatechange = setPageData;
		xmlhttp.open('GET', pageURL, true);
		xmlhttp.send(null);
		if(strReturnValue){
			return strReturnValue;
		}
	}
}
function setPageData(){
	if(xmlhttp.readyState == 4){
		try{
			strReturnValue = xmlhttp.responseText;
		}catch(e){
		}
	}
}
function createXMLHttp(){
	try{
		return new ActiveXObject("Microsoft.XMLHTTP");
	}catch(e){
		try {
			return new XMLHttpRequest();
		}catch(e){
			return null;
		}
	}
	return null;
}
function fncSearch(){
	try{
		var iWidth = 400;
		var iLeft = screen.width - iWidth;
		var iHeight = screen.height - 32;
		var wnd = window.open(
			"../frame_htmls/search.htm?conditions=" + document.getElementById("id_search").value,
			"canon_search",
			"directories=no,location=no,menubar=no,status=no,toolbar=no,resizable=yes,width=400,top=0,left=" + iLeft + ",height=" + iHeight
		);

	}catch(e){
		if(e.description){
			alert(e.description);
		}else{
			alert(e);
		}
	}
}
function fncOpenSubWindow(strUrl){
	try{
		var iWidth = 400;
		var iLeft = screen.width - iWidth;
		var iHeight = screen.height - 32;
		var wnd = window.open(
			strUrl,
			"canon_sub_window",
			"directories=no,location=no,menubar=no,status=no,toolbar=no,resizable=yes,width=400,top=0,left=" + iLeft + ",height=" + iHeight
		);
//		with(wnd){
//			moveTo(iLeft);
//			resizeTo(iWidth, iHeight);
//			self.focus();
//		}
	}catch(e){
		if(e.description){
			alert(e.description);
		}else{
			alert(e);
		}
	}
}
function fncPrint(){
	try{
		window.open(document.location.href + "?print=yes");
	}catch(e){
		if(e.description){
			alert(e.description);
		}else{
			alert(e);
		}
	}
}
function htmlspecialchars_decode(str) {
	str = str.replace(/&lt;/g ,'<');
	str = str.replace(/&gt;/g ,'>');
	str = str.replace(/&quot;/g,'"');
	str = str.replace(/&#039;/g,"'");
	str = str.replace(/&amp;/g ,'&');

	return str;
}
function htmlspecialchars(str) {
	str = str.replace(/&/g ,'&amp;');
	str = str.replace(/</g ,'&lt;');
	str = str.replace(/>/g ,'&gt;');
	str = str.replace(/"/g,'&quot;');
	str = str.replace(/'/g,'&#039;');

	return str;
}
function h(str) {
	return htmlspecialchars(str);
}

document.onkeypress = function fncOnKeyPress(){
	if(window.event.keyCode == 13){
		var eSrc = window.event.srcElement;
		var strNodeName = eSrc.nodeName;
		if(eSrc == document.getElementById("id_search") ||
			strNodeName == "BODY" || strNodeName == "DIV" || strNodeName == "SPAN"
		){
			if(document.getElementById("id_search")){
				if(document.getElementById("id_search_button")){
					document.getElementById("id_search_button").onclick();
					return false;
				}
			}
			return false;
		}
	}
}