function imgRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("__roll."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("__roll.", "__rollon."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("__rollon.", "__roll."));
					openCurrentPageList();
					if(typeof window.openCurrentPlanList == 'function'){
						openCurrentPlanList();	
					}
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", imgRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", imgRollover);
}


//Current Category Link List Open

function openCurrentPageList() {
	var docURL = location.href;
	var catName = '';
	if(docURL.match("\/accommodation\/")!=null){
		catName = '1';
	}
	if(docURL.match("\/gourmet\/")!=null){
		catName = '2';
	}
	if(docURL.match("\/shopping\/")!=null){
		catName = '3';
	}
	if(docURL.match("\/sightseeing\/")!=null){
		catName = '4';
	}
	if(catName != ''){
		if(document.getElementById) {
			var currentCatBt = document.getElementById("sgn_catbt_"+catName);
		}
		currentCatBt.setAttribute("src", currentCatBt.getAttribute("src").replace("__roll.", "__rollon."));
	}
	
}
window.onload = function(){
	openCurrentPageList();
	if(typeof window.openCurrentPlanList == 'function'){
		openCurrentPlanList();	
	}
}
