// image roll
function menuOver() {
	this.src = this.src.replace(".gif", "_on.gif");
}
function menuOut() {
	this.src = this.src.replace("_on.gif", ".gif");
}

function imageOver(imgEl) {
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}
function imageOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}


// 팝업
function open_popup(url, wid, hei, scroll, winName)
{
	var url = url;
	var posi = "width="+ wid +",height="+hei+",toolbar=no,location=no,status=no,menubar=no,top=10,left=50,scrollbars=" + scroll +",resizable=no" ;
	if (winName == "")
	{
		winName = popup;
	}
	window.open(url,winName,posi);
}

//목록상자 링크
function selectGo(dropdownName){
	var page = document.all[dropdownName].value;
	if(page !="") window.open(page);
}

//링크 주변 점선 없애기
/*var myAnchors=document.all.tags("A");

function allblur() {
	for (i=0;i<myAnchors.length;i++) {
		myAnchors[i].onfocus=new Function("blur()");
	}
}

allblur();
*/

function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function overColor(td){
td.style.backgroundColor="#454545";//마우스가 올라갔을때의 색상 설정
}

function outColor(td){
td.style.backgroundColor="#000000";//마우스가 내려왔을때의 색상 설정
}
function onChangeUrl(obj)
{
var destURL = obj.options[obj.selectedIndex].value;
document.location.href = destURL;
}

//
function styleThumb(status,name)
{
	imgName=eval("thumb_"+name);
	imgName.className="product_style_"+status;
}

function styleThumb01(status,name)
{
	imgName=eval("thumb_"+name);
	imgName.className="product01_style_"+status;
}






var bSelStatus = "N";
function boardSort()
{
	if(bSelStatus=="N")
	{
		boxSortList.style.display="block";
		bSelStatus = "Y";
	}
	else
	{
		boxSortList.style.display="none";
		bSelStatus = "N";
	}
}

function dispTitle()
{
	document.write("<title>내손안의 즐거움 My HandFun 1to1</title>")
}

//팝업창 열기
function popWin(url,name,width,height,scroll)
{
	leftPos=(screen.width-width)/2;
	topPos=(screen.height-height)/2;
	window.open(url,name,'width='+width+',height='+height+',top='+topPos+',left='+leftPos+', scrollbars=,'+scroll+' scrolling='+scroll+'')
}

//iframe noscroll
function iframeresizing()
{
	    var i = iframesubcontents.document.body;
	    var j = document.getElementById("iframesubcontents");
	    //document.all["iframesubcontents"];

	    j.style.height = i.scrollHeight + (i.offsetHeight - i.clientHeight);
	    h = i.scrollHeight + (i.offsetHeight - i.clientHeight)+10;
	    iframesubcontents.resizeTo(610,h);
}

function parentresizing()
{
	    parent.iframeresizing();
}
