// JavaScript Document

//rollover//
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
//10.15 del nakano
//			if(images[i].getAttribute("src").match("_off."))
//			{
//				images[i].onmouseover = function() {
//					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
//				}
//				images[i].onmouseout = function() {
//					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
//				}
//			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}

//10.15 del nakano
//auto-scroll//
//Event.observe(window, 'load', function() {
//  $$('a[href^=#]:not([href=#])').each(function(element) {
//    element.observe('click', function(event) {
//      new Effect.ScrollTo(this.hash.substr(1));
//      Event.stop(event);
//    }.bindAsEventListener(element))
//  })
//})

/*
CSS Browser Selector v0.2.7
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();


//Swap Image//

timer = "";

function SwapImage(img) {
obj = document.getElementById("image");
obj.src = img;
clearTimeout(timer);
timer=setTimeout('DefaultImage()',5000);
}

function DefaultImage() {
obj = document.getElementById("image");
obj.src = 'img/goodsdetail_photo_001.jpg';
clearTimeout(timer);
}

//
function change(myURI){
 if(myURI !="default"){
  window.document.location.href=myURI;
 }
}
