var TimerFlag;
var MoveGrid = 10;
var MoveObjs = new Array();
var MoveStart = new Array();
var StartX = new Array();
var StartY = new Array();
var GoulX = new Array();
var GoulY = new Array();
var MoveDiff = new Array();
var MoveSum = new Array();
var LoopCount = new Array();
var AccentType = new Array();
var MoveObjsMax = 0;


var OverBar = null;
var LastButton = null;

var sendObj = window.self;
var ptr = String(window.location).lastIndexOf('/')
var domain = String(window.location).substr(0,ptr);

domain = "../.."

var saveLineStyle = "";
var saveColor = "";
var ViewMode = 1;

var ImageObj = new Image();
ImageObj.onload = ImageLoadEnd;

var ImageObj_for_shopping = new Image();
ImageObj_for_shopping.onload = ImageLoadEnd_for_shopping;

var DecoCMD = new Array
(""
,"progid:DXImageTransform.Microsoft.Alpha( Opacity=100, FinishOpacity=0, Style=2, StartX=0,  FinishX=100, StartY=0, FinishY=100)"
,"progid:DXImageTransform.Microsoft.Alpha( Opacity=100, FinishOpacity=0, Style=3, StartX=0,  FinishX=100, StartY=0, FinishY=100)"
,"progid:DXImageTransform.Microsoft.Blur(PixelRadius='2', MakeShadow='false', ShadowOpacity='0.00')"
,"progid:DXImageTransform.Microsoft.Blur(PixelRadius='3', MakeShadow='false', ShadowOpacity='0.00')"
,"progid:DXImageTransform.Microsoft.Blur(PixelRadius='5', MakeShadow='false', ShadowOpacity='0.00')"
,"progid:DXImageTransform.Microsoft.dropshadow(OffX=5, OffY=5, Color='gray', Positive='true')"
,"progid:DXImageTransform.Microsoft.Emboss()"
,"progid:DXImageTransform.Microsoft.Engrave()"
,"progid:DXImageTransform.Microsoft.Glow(color='gray', Strength='5')"
,"progid:DXImageTransform.Microsoft.Glow(color='black', Strength='5')"
,"progid:DXImageTransform.Microsoft.Glow(color='blue', Strength='5')"
,"progid:DXImageTransform.Microsoft.Glow(color='red', Strength='5')"
,"progid:DXImageTransform.Microsoft.Shadow(color='gray', Direction=135, Strength=4)"
,"progid:DXImageTransform.Microsoft.Shadow(color='gray', Direction=135, Strength=8)"
,"progid:DXImageTransform.Microsoft.Shadow(color='gray', Direction=135, Strength=16)"
,"progid:DXImageTransform.Microsoft.Wave(Add='false', LightStrength=0, Phase=0, Strength=3,  Freq=20)"
,"progid:DXImageTransform.Microsoft.Wave(Add='false', LightStrength=0, Phase=0, Strength=5,  Freq=5)"
,"progid:DXImageTransform.Microsoft.Wave(Add='false', LightStrength=0, Phase=0, Strength=10,  Freq=1)"
,"progid:DXImageTransform.Microsoft.Alpha( Opacity=80, FinishOpacity=0, Style=0, StartX=0,  FinishX=100, StartY=0, FinishY=100)"
,"progid:DXImageTransform.Microsoft.Alpha( Opacity=50, FinishOpacity=0, Style=0, StartX=0,  FinishX=100, StartY=0, FinishY=100)"
,"progid:DXImageTransform.Microsoft.Alpha( Opacity=20, FinishOpacity=0, Style=0, StartX=0,  FinishX=100, StartY=0, FinishY=100)"
,"progid:DXImageTransform.Microsoft.Glow(color='white', Strength='5')"
,"progid:DXImageTransform.Microsoft.Glow(color='gray', Strength='10')"
,"progid:DXImageTransform.Microsoft.Glow(color='black', Strength='10')"
,"progid:DXImageTransform.Microsoft.Glow(color='blue', Strength='10')"
,"progid:DXImageTransform.Microsoft.Glow(color='red', Strength='10')"
,"progid:DXImageTransform.Microsoft.Glow(color='white', Strength='10')"
);

var AppeaCMD = new Array
("progid:DXImageTransform.Microsoft.Barn(orientation=horizontal, motion=out) "
,"progid:DXImageTransform.Microsoft.Barn(orientation=vertical, motion=out) "
,"progid:DXImageTransform.Microsoft.Blinds(bands=8,  direction='LEFT') "
,"progid:DXImageTransform.Microsoft.Blinds(bands=8,  direction='UP') "
,"progid:DXImageTransform.Microsoft.Checkerboard(squaresX=12,squaresY=12, direction='right', duration=1) "
,"progid:DXImageTransform.Microsoft.Fade(duration=1.0,overlap=1.0) "
,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0, wipeStyle=0, motion='forward') "
,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0, wipeStyle=1, motion='reverse') "
,"progid:DXImageTransform.Microsoft.Inset()"
,"progid:DXImageTransform.Microsoft.Iris(irisStyle='CIRCLE', motion='out') "
,"progid:DXImageTransform.Microsoft.Iris(irisStyle='CROSS', motion='out') "
,"progid:DXImageTransform.Microsoft.Iris(irisStyle='PLUS', motion='out') "
,""
,"progid:DXImageTransform.Microsoft.Iris(irisStyle='SQUARE', motion='out') "
,"progid:DXImageTransform.Microsoft.Iris(irisStyle='STAR', motion='out') "
,"progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=50,Duration=1, Enabled=false)"
,"progid:DXImageTransform.Microsoft.RadialWipe(wipeStyle='clock') "
,"progid:DXImageTransform.Microsoft.RadialWipe(wipeStyle='WEDGE') "
,"progid:DXImageTransform.Microsoft.RadialWipe(wipeStyle='RADIAL') "
,"progid:DXImageTransform.Microsoft.RandomBars(orientation='horizontal')"
,"progid:DXImageTransform.Microsoft.RandomBars(orientation='vertical')"
,"progid:DXImageTransform.Microsoft.RandomDissolve() "
,"progid:DXImageTransform.Microsoft.Slide(slideStyle='PUSH', bands=1) "
,"progid:DXImageTransform.Microsoft.Spiral(GridSizeX=16, GridSizeY=16) "
,"progid:DXImageTransform.Microsoft.Stretch(stretchStyle='push') "
,"progid:DXImageTransform.Microsoft.Strips(Duration=5, Motion='leftdown') "
,"progid:DXImageTransform.Microsoft.Strips(Duration=5, Motion='rightup') "
,"progid:DXImageTransform.Microsoft.Wheel(spokes=4)"
,"progid:DXImageTransform.Microsoft.zigzag(GridSizeX=16, GridSizeY=16) ");




var MoveAccent = new Array(0);
MoveAccent[0] = new Array(0);
MoveAccent[1] = new Array(0,44,60,71,80,87,92,95,98,99,100,99,98,95,92,87,80,71,60,44,0);
MoveAccent[2] = new Array(0,-44,-60,-71,-80,-87,-92,-95,-98,-99,-100,-99,-98,-95,-92,-87,-80,-71,-60,-44,0);
MoveAccent[3] = new Array(0,-30,-40,-46,-49,-50,-49,-46,-40,-30,0,30,40,46,49,50,49,46,40,30,0);
var AccenetX;
var AccenetY;

var CycleMove = new Array(0);
CycleMove[0] = new Array(0);


// 左⇔右
CycleMove[1] = new Array(-8,0, -8,0, -4,0, -2,0, 2,0, 4,0, 8,0, 8,0, 8,0, 8,0, 4,0, 2,0, -2,0, -4,0, -8,0, -8,0);
// 上⇔下
CycleMove[2] = new Array(0,-8, 0,-8, 0,-4, 0,-2, 0,2, 0,4, 0,8, 0,8, 0,8, 0,8, 0,4, 0,2, 0,-2, 0,-4, 0,-8, 0,-8);
// 左上⇔右下
CycleMove[3] = new Array(-8,-8, -8,-8, -4,-4, -2,-2, 2,2, 4,4, 8,8, 8,8, 8,8, 8,8, 4,4, 2,2, -2,-2, -4,-4, -8,-8, -8,-8);
// 右上⇔左下
CycleMove[4] = new Array(8,-8, 8,-8, 4,-4, 2,-2, -2,2, -4,4, -8,8, -8,8, -8,8, -8,8, -4,4, -2,2, 2,-2, 4,-4, 8,-8, 8,-8);
// 上半円往復
CycleMove[5] = new Array(1, -11, 3, -11, 5, -10, 6, -9, 8, -8, 9, -6, 10, -5, 11, -3, 11, -1, 11, 1, 11, 3, 10, 5, 9, 6, 8, 8, 6, 9, 5, 10, 3, 11, 1, 11, -1, -11, -3, -11, -5, -10, -6, -9, -8, -8, -9, -6, -10, -5, -11, -3, -11, -1, -11, 1, -11, 3, -10, 5, -9, 6, -8, 8, -6, 9, -5, 10, -3, 11, -1, 11);
// ２上半円往復
CycleMove[6] = new Array(1, -11, 3, -11, 5, -10, 6, -9, 8, -8, 9, -6, 10, -5, 11, -3, 11, -1, 11, 1, 11, 3, 10, 5, 9, 6, 8, 8, 6, 9, 5, 10, 3, 11, 1, 11, -1, -11, -3, -11, -5, -10, -6, -9, -8, -8, -9, -6, -10, -5, -11, -3, -11, -1, -11, 1, -11, 3, -10, 5, -9, 6, -8, 8, -6, 9, -5, 10, -3, 11, -1, 11, -1, -11, -3, -11, -5, -10, -6, -9, -8, -8, -9, -6, -10, -5, -11, -3, -11, -1, -11, 1, -11, 3, -10, 5, -9, 6, -8, 8, -6, 9, -5, 10, -3, 11, -1, 11, 1, -11, 3, -11, 5, -10, 6, -9, 8, -8, 9, -6, 10, -5, 11, -3, 11, -1, 11, 1, 11, 3, 10, 5, 9, 6, 8, 8, 6, 9, 5, 10, 3, 11, 1, 11);

// 左に一周 時計周り
CycleMove[7] = new Array(-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1,-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11,1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1,11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11);

// 右に一周 時計周り
CycleMove[8] = new Array(1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1,11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11,-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1,-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11);
// 右に一周 反時計周り
// CycleMove[1] = new Array(1,11,3,11,5,10,6,9,8,8,9,6,10,5,11,3,11,1,11,-1,11,-3,10,-5,9,-6,8,-8,6,-9,5,-10,3,-11,1,-11,-1,-11,-3,-11,-5,-10,-6,-9,-8,-8,-9,-6,-10,-5,-11,-3,-11,-1,-11,1,-11,3,-10,5,-9,6,-8,8,-6,9,-5,10,-3,11,-1,11);

// 下に一周 時計周り
CycleMove[9] = new Array(11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11,-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1,-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11,1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1);

// 上に一周 時計周り
CycleMove[10] = new Array(-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11,1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1,11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11,-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1);
// 上に一周 反時計周り
// CycleMove[10] = new Array(11,-1,11,-3,10,-5,9,-6,8,-8,6,-9,5,-10,3,-11,1,-11,-1,-11,-3,-11,-5,-10,-6,-9,-8,-8,-9,-6,-10,-5,-11,-3,-11,-1,-11,1,-11,3,-10,5,-9,6,-8,8,-6,9,-5,10,-3,11,-1,11,1,11,3,11,5,10,6,9,8,8,9,6,10,5,11,3,11,1);

// 左上右下連続４周
CycleMove[11] = new Array(-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1,-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11,1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1,11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11
						,-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11,1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1,11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11,-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1
						 ,1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1,11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11,-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1,-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11
						,11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11,-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1,-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11,1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1);
// 左右連続２周
CycleMove[12] = new Array(-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1,-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11,1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1,11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11,1,11,3,11,5,10,6,9,8,8,9,6,10,5,11,3,11,1,11,-1,11,-3,10,-5,9,-6,8,-8,6,-9,5,-10,3,-11,1,-11,-1,-11,-3,-11,-5,-10,-6,-9,-8,-8,-9,-6,-10,-5,-11,-3,-11,-1,-11,1,-11,3,-10,5,-9,6,-8,8,-6,9,-5,10,-3,11,-1,11);
// 上下連続２周
CycleMove[13] = new Array(11,-1,11,-3,10,-5,9,-6,8,-8,6,-9,5,-10,3,-11,1,-11,-1,-11,-3,-11,-5,-10,-6,-9,-8,-8,-9,-6,-10,-5,-11,-3,-11,-1,-11,1,-11,3,-10,5,-9,6,-8,8,-6,9,-5,10,-3,11,-1,11,1,11,3,11,5,10,6,9,8,8,9,6,10,5,11,3,11,1,11,1,11,3,10,5,9,6,8,8,6,9,5,10,3,11,1,11,-1,11,-3,11,-5,10,-6,9,-8,8,-9,6,-10,5,-11,3,-11,1,-11,-1,-11,-3,-10,-5,-9,-6,-8,-8,-6,-9,-5,-10,-3,-11,-1,-11,1,-11,3,-11,5,-10,6,-9,8,-8,9,-6,10,-5,11,-3,11,-1);
//CycleMove[1] = new Array(30,2,27,5,21,7,14,10,5,12,-5,13,-14,13,-21,13,-27,12,-30,10,-30,7,-27,4,-21,0,-14,-4,-5,-8,5,-12,14,-16,21,-20,27,-23,30,-25,30,-27,27,-27,21,-27,14,-26,5,-24,-5,-21,-14,-17,-21,-13,-27,-8,-30,-3,-30,3,-27,8,-21,13,-14,17,-5,21,5,24,14,26,21,27,27,27,30,27,30,25,27,23,21,20,14,16,5,12,-5,8,-14,4,-21,-0,-27,-4,-30,-7,-30,-10,-27,-12,-21,-13,-14,-13,-5,-13,5,-12,14,-10,21,-7,27,-5,30,-2,30,2,27,5,21,7,14,10,5,12,-5,13,-14,13,-21,13,-27,12,-30,10,-30,7,-27,4,-21,0,-14,-4,-5,-8,5,-12,14,-16,21,-20,27,-23,30,-25,30,-27,27,-27,21,-27,14,-26,5,-24,-5,-21,-14,-17,-21,-13,-27,-8,-30,-3,-30,3,-27,8,-21,13,-14,17,-5,21,5,24,14,26,21,27,27,27,30,27,30,25,27,23,21,20,14,16,5,12,-5,8,-14,4,-21,-0,-27,-4,-30,-7,-30,-10,-27,-12,-21,-13,-14,-13,-5,-13,5,-12,14,-10,21,-7,27,-5,30,-2);
// 三葉線
//CycleMove[14] = new Array(20,1,20,2,19,3,18,5,17,6,16,7,14,8,12,8,11,9,9,9,6,9,4,9,2,8,-0,7,-2,6,-4,5,-6,4,-8,2,-10,1,-11,-1,-12,-3,-13,-5,-13,-7,-14,-9,-14,-10,-14,-12,-13,-14,-13,-15,-12,-16,-11,-17,-9,-18,-8,-18,-7,-18,-5,-18,-4,-18,-2,-17,-1,-16,1,-15,2,-13,3,-12,4,-10,5,-8,6,-6,6,-3,7,-1,7,1,6,3,6,6,5,8,4,10,3,12,2,13,1,15,-1,16,-2,17,-4,18,-5,18,-7,18,-8,18,-9,18,-11,17,-12,16,-13,15,-13,14,-14,12,-14,10,-14,9,-13,7,-13,5,-12,3,-11,1,-10,-1,-8,-2,-6,-4,-4,-5,-2,-6,-0,-7,2,-8,4,-9,6,-9,9,-9,11,-9,12,-8,14,-8,16,-7,17,-6,18,-5,19,-3,20,-2,20,-1);

CycleMove[14] = new Array(15,3,10,6,2,6,-6,2,-11,-5,-11,-11,-5,-14,1,-11,5,-4,5,4,1,11,-5,14,-11,11,-11,5,-6,-2,2,-6,10,-6,15,-3);

//CycleMove[14] = new Array(3.0,0.0,3.0,1.0,2.0,1.0,1.0,1.0,0.0,1.0,-1.0,0.0,-3.0,0.0,-2.0,-2.0,-3.0,-2.0,-2.0,-3.0,-2.0,-2.0,0.0,-3.0,0.0,-1.0,1.0,0.0,1.0,1.0,1.0,2.0,1.0,3.0,0.0,3.0,0.0,3.0,-1.0,3.0,-1.0,2.0,-1.0,1.0,-1.0,0.0,0.0,-1.0,0.0,-3.0,2.0,-2.0,2.0,-3.0,3.0,-2.0,2.0,-2.0,3.0,0.0,1.0,0.0,0.0,1.0,-1.0,1.0,-2.0,1.0,-3.0,1.0,-3.0,0.0);
// 四葉線
CycleMove[15] = new Array(27,2,26,6,24,9,21,12,18,14,14,16,10,17,6,17,1,16,-3,14,-7,12,-10,9,-13,5,-15,1,-16,-4,-17,-8,-16,-12,-15,-16,-13,-20,-10,-23,-7,-25,-4,-26,-0,-27,4,-26,7,-25,10,-23,13,-20,15,-16,16,-12,17,-8,16,-4,15,1,13,5,10,9,7,12,3,14,-1,16,-6,17,-10,17,-14,16,-18,14,-21,12,-24,9,-26,6,-27,2,-27,-2,-26,-6,-24,-9,-21,-12,-18,-14,-14,-16,-10,-17,-6,-17,-1,-16,3,-14,7,-12,10,-9,13,-5,15,-1,16,4,17,8,16,12,15,16,13,20,10,23,7,25,4,26,0,27,-4,26,-7,25,-10,23,-13,20,-15,16,-16,12,-17,8,-16,4,-15,-1,-13,-5,-10,-9,-7,-12,-3,-14,1,-16,6,-17,10,-17,14,-16,18,-14,21,-12,24,-9,26,-6,27,-2);

var fSin90= new Array
(0.00000
,0.01745
,0.03490
,0.05234
,0.06976
,0.08716
,0.10453
,0.12187
,0.13917
,0.15643
,0.17365
,0.19081
,0.20791
,0.22495
,0.24192
,0.25882
,0.27564
,0.29237
,0.30902
,0.32557
,0.34202
,0.35837
,0.37461
,0.39073
,0.40674
,0.42262
,0.43837
,0.45399
,0.46947
,0.48481
,0.50000
,0.51504
,0.52992
,0.54464
,0.55919
,0.57358
,0.58779
,0.60182
,0.61566
,0.62932
,0.64279
,0.65606
,0.66913
,0.68200
,0.69466
,0.70711
,0.71934
,0.73135
,0.74314
,0.75471
,0.76604
,0.77715
,0.78801
,0.79864
,0.80902
,0.81915
,0.82904
,0.83867
,0.84805
,0.85717
,0.86603
,0.87462
,0.88295
,0.89101
,0.89879
,0.90631
,0.91355
,0.92050
,0.92718
,0.93358
,0.93969
,0.94552
,0.95106
,0.95630
,0.96126
,0.96593
,0.97030
,0.97437
,0.97815
,0.98163
,0.98481
,0.98769
,0.99027
,0.99255
,0.99452
,0.99619
,0.99756
,0.99863
,0.99939
,0.99985
,1.00000
);


var OutLinePos = new Array(0);
// OutLinePos[0] = new Array( -1,-1, 1,1, -1,1, 1,-1, -1,0, 1,0, 0,-1, 0,1, -2,-2, 2,2, -2,2, 2,-2, -2,0, 2,0, 0,-2, 0,2);
// OutLinePos[0] = new Array( -1,-1, 1,1, -1,1, 1,-1, -1,0, 1,0, 0,-1, 0,1, -2,0, 2,0, 0,-2, 0,2, -2,1, 2,1, 1,-2, 1,2, -2,-1, 2,-1, -1,-2, -1,2);
OutLinePos[0] = new Array( -2,-2, -1,-2, 0,-2, 1,-2, 2,-2,	 -2,-1, -1,-1, 0,-1, 1,-1, 2,-1,   -2,0, -1,0,	1,0, 2,0,  -2,1, -1,1, 0,1, 1,1, 2,1,	-2,2, -1,2, 0,2, 1,2, 2,2);


function fCos(seata)
{
	return fSin(seata+90);
}

function fSin(seata)
{
	while(seata < 0)
	{
		seata += 360;
	}
	seata %= 360;
	return fSin360(seata);
}

function fSin360(seata)
{
	if(seata >= 180)
	{
		return -fSin180(seata-180);
	}
	return fSin180(seata);
}

function fSin180(seata)
{
	if(seata >= 90)
	{
		seata = 180 - seata;
	}
	return fSin90[seata];
}


function GetBase()
{
	var oBaseColl = document.all.tags('base');
	return ( (oBaseColl && oBaseColl.length) ? oBaseColl[0].href : null );
}

function UClock()
{
	var OverLap = 1;
	for(midx = 0;midx < MoveObjsMax;midx++)
	{
		if(MoveStart[midx] > 0)
		{
			MoveStart[midx]--;
		}
		else if(MoveStart[midx] == 0)
		{
			switch(MoveObjs[midx].style.UAppearance)
			{
				case 'LMI' :
					AccenetY = 0;
					StartX[midx] += MoveGrid;
					if(GoulX[midx] < StartX[midx])
					{
						StartX[midx] = GoulX[midx];
						MoveStart[midx] = -1;
					}
					else
					{
						if(AccentType[midx] > 0)
						{
							AccenetY = -MoveAccent[AccentType[midx]][((GoulX[midx] - StartX[midx]) / 10) % 20];
						}
						else
						{
//							seata = (((GoulX[midx] - StartX[midx]) / 10) % 20) * 18;
//							rfilter = RotateFilter(360-seata);
//							MoveObjs[midx].style.filter = rfilter;
							AccenetY = 0;
						}
					}
					MoveObjs[midx].style.pixelLeft = StartX[midx];
					MoveObjs[midx].style.pixelTop = GoulY[midx] + AccenetY;
					MoveObjs[midx].style.display = "block";
					break;
				case 'RMI' :
					AccenetY = 0;
					StartX[midx] -= MoveGrid;
					if(GoulX[midx] > StartX[midx])
					{
						StartX[midx] = GoulX[midx];
						MoveStart[midx] = -1;
					}
					else
					{
						if(AccentType[midx] > 0)
						{
							AccenetY = -MoveAccent[AccentType[midx]][((StartX[midx] - GoulX[midx]) / 10) % 20];
						}
						else
						{
							AccenetY = 0;
						}
					}
					MoveObjs[midx].style.pixelLeft = StartX[midx];
					MoveObjs[midx].style.pixelTop = GoulY[midx] + AccenetY;
					MoveObjs[midx].style.display = "block";
					break;
				case 'TMI' :
					AccenetX = 0;
					StartY[midx] += MoveGrid;
					if(GoulY[midx] < StartY[midx])
					{
						StartX[midx] = GoulX[midx];
						MoveStart[midx] = -1;
					}
					else
					{
						if(AccentType[midx] > 0)
						{
							AccenetX = -MoveAccent[AccentType[midx]][((GoulY[midx] - StartY[midx]) / 10) % 20];
						}
						else
						{
							AccenetX = 0;
						}
					}
					MoveObjs[midx].style.pixelLeft = GoulX[midx] + AccenetX;
					MoveObjs[midx].style.pixelTop = StartY[midx];
					MoveObjs[midx].style.display = "block";
					break;
				case 'BMI' :
					AccenetX = 0;
					StartY[midx] -= MoveGrid;
					if(GoulY[midx] > StartY[midx])
					{
						StartX[midx] = GoulX[midx];
						MoveStart[midx] = -1;
					}
					else
					{
						if(AccentType[midx] > 0)
						{
							AccenetX = -MoveAccent[AccentType[midx]][((StartY[midx] - GoulY[midx]) / 10) % 20];
						}
						else
						{
							AccenetX = 0;
						}
					}
					MoveObjs[midx].style.pixelLeft = GoulX[midx] + AccenetX;
					MoveObjs[midx].style.pixelTop = StartY[midx];
					MoveObjs[midx].style.display = "block";
					break;
				case 'LFI' :
					AccenetY = 0;
					StartX[midx] += MoveGrid;
					if(GoulX[midx] < StartX[midx])
					{
						StartX[midx] = GoulX[midx];
						MoveStart[midx] = -1;
					}
					else
					{
						if(AccentType[midx] > 0)
						{
							AccenetY = -MoveAccent[AccentType[midx]][((GoulX[midx] - StartX[midx]) / 10) % 20];
						}
						else
						{
							AccenetY = 0;
						}
					}
					MoveObjs[midx].style.pixelLeft = StartX[midx];
					MoveObjs[midx].style.pixelTop = GoulY[midx] + AccenetY;
					MoveSum[midx] += MoveDiff[midx];
					if(MoveSum[midx] >= 99)
					{
						MoveSum[midx] = 100;
					}
					MoveObjs[midx].style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + String(MoveSum[midx])  + ",Style=0)";
					MoveObjs[midx].style.display = "block";
					break;
				case 'RFI' :
					AccenetY = 0;
					StartX[midx] -= MoveGrid;
					if(GoulX[midx] > StartX[midx])
					{
						StartX[midx] = GoulX[midx];
						MoveStart[midx] = -1;
					}
					else
					{
						if(AccentType[midx] > 0)
						{
							AccenetY = -MoveAccent[AccentType[midx]][((StartX[midx] - GoulX[midx]) / 10) % 20];
						}
						else
						{
							AccenetY = 0;
						}
					}
					MoveObjs[midx].style.pixelLeft = StartX[midx];
					MoveObjs[midx].style.pixelTop = GoulY[midx] + AccenetY;
					MoveSum[midx] += MoveDiff[midx];
					if(MoveSum[midx] >= 99)
					{
						MoveSum[midx] = 100;
					}
					MoveObjs[midx].style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + String(MoveSum[midx])  + ",Style=0)";
					MoveObjs[midx].style.display = "block";
					break;
				case 'TFI' :
					StartY[midx] += MoveGrid;
					if(GoulY[midx] < StartY[midx])
					{
						StartX[midx] = GoulX[midx];
						MoveStart[midx] = -1;
					}
					else
					{
						if(AccentType[midx] > 0)
						{
							AccenetX = -MoveAccent[AccentType[midx]][((GoulY[midx] - StartY[midx]) / 10) % 20];
						}
						else
						{
							AccenetX = 0;
						}
					}
					MoveObjs[midx].style.pixelLeft = GoulX[midx] + AccenetX;
					MoveObjs[midx].style.pixelTop = StartY[midx];
					MoveSum[midx] += MoveDiff[midx];
					if(MoveSum[midx] >= 99)
					{
						MoveSum[midx] = 100;
					}
					MoveObjs[midx].style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + String(MoveSum[midx])  + ",Style=0)";
					MoveObjs[midx].style.display = "block";
					break;
				case 'BFI' :
					StartY[midx] -= MoveGrid;
					if(GoulY[midx] > StartY[midx])
					{
						StartX[midx] = GoulX[midx];
						MoveStart[midx] = -1;
					}
					else
					{
						if(AccentType[midx] > 0)
						{
							AccenetX = -MoveAccent[AccentType[midx]][((StartY[midx] - GoulY[midx]) / 10) % 20];
						}
						else
						{
							AccenetX = 0;
						}
					}
					MoveObjs[midx].style.pixelLeft = GoulX[midx] + AccenetX;
					MoveObjs[midx].style.pixelTop = StartY[midx];
					MoveSum[midx] += MoveDiff[midx];
					if(MoveSum[midx] >= 99)
					{
						MoveSum[midx] = 100;
					}
					MoveObjs[midx].style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + String(MoveSum[midx])  + ",Style=0)";
					MoveObjs[midx].style.display = "block";
					break;
				case 'TLZ' :
					if(MoveDiff[midx] < 100)
					{
						MoveDiff[midx] += 5;

						MoveObjs[midx].style.zoom = String(MoveDiff[midx]) + "%";
						MoveObjs[midx].style.display = "block";
					}
					else
					{
						MoveStart[midx] = -1;
					}
					break;
				case 'CCZ' :
					if(MoveDiff[midx] < 100)
					{
						MoveDiff[midx] += 5;

						MoveObjs[midx].style.pixelLeft = GoulX[midx] + Math.ceil((StartX[midx] * (100 - MoveDiff[midx])) / 200);
						MoveObjs[midx].style.pixelTop  = GoulY[midx] + Math.ceil((StartY[midx] * (100 - MoveDiff[midx])) / 200);

						MoveObjs[midx].style.zoom = String(MoveDiff[midx]) + "%";
						MoveObjs[midx].style.display = "block";
					}
					else
					{
						MoveStart[midx] = -1;
					}
					break;
				case 'TRZ' :
					if(MoveDiff[midx] < 100)
					{
						MoveDiff[midx] += 5;

						MoveObjs[midx].style.pixelLeft = GoulX[midx] + Math.ceil((StartX[midx] * (100 - MoveDiff[midx])) / 100);

						MoveObjs[midx].style.zoom = String(MoveDiff[midx]) + "%";
						MoveObjs[midx].style.display = "block";
					}
					else
					{
						MoveStart[midx] = -1;
					}
					break;
				case 'BLZ' :
					if(MoveDiff[midx] < 100)
					{
						MoveDiff[midx] += 5;

						MoveObjs[midx].style.pixelTop  = GoulY[midx] + Math.ceil((StartY[midx] * (100 - MoveDiff[midx])) / 100);

						MoveObjs[midx].style.zoom = String(MoveDiff[midx]) + "%";
						MoveObjs[midx].style.display = "block";
					}
					else
					{
						MoveStart[midx] = -1;
					}
					break;
				case 'BRZ' :
					if(MoveDiff[midx] < 100)
					{
						MoveDiff[midx] += 5;

						MoveObjs[midx].style.pixelLeft = GoulX[midx] + Math.ceil((StartX[midx] * (100 - MoveDiff[midx])) / 100);
						MoveObjs[midx].style.pixelTop  = GoulY[midx] + Math.ceil((StartY[midx] * (100 - MoveDiff[midx])) / 100);

						MoveObjs[midx].style.zoom = String(MoveDiff[midx]) + "%";
						MoveObjs[midx].style.display = "block";
					}
					else
					{
						MoveStart[midx] = -1;
					}
					break;
				default :
					if(String(MoveObjs[midx].style.UAppearance) != "undefined")
					{
						AppeaID = parseInt(MoveObjs[midx].style.UAppearance) - 17;
						MoveObjs[midx].style.visibility="hidden";
						MoveObjs[midx].style.display = "block";
						FilterBackCMD = MoveObjs[midx].style.filter;

						MoveObjs[midx].style.filter = AppeaCMD[AppeaID];
						MoveObjs[midx].style.filter += FilterBackCMD;

						MoveObjs[midx].filters[0].Apply();
						MoveObjs[midx].style.visibility="visible";
					   	MoveObjs[midx].filters[0].Play(duration=3);
						OverLap = 0;
					}
					MoveStart[midx] = -1;
			}
			if(OverLap == 1)
			{
				var DecoNowCMD1 = "";
				var DecoNowCMD2 = "";
				if(String(MoveObjs[midx].style.UDecoration) != "undefined")
				{
					DecoNowCMD1 = DecoCMD[parseInt(MoveObjs[midx].style.UDecoration)];
				}
				seata = MoveObjs[midx].style.URot;
				if(seata != null)
				{
					if(seata != 0)
					{
						seata = -seata;
						rotateCmd = "progid:DXImageTransform.Microsoft.Matrix("
									 + "M11=" + String(fCos(seata))
									 + ",M12=" + String(-1 *fSin(seata))
									 + ",M21=" + String(fSin(seata))
									 + ",M22=" + String(fCos(seata))
									 + ",Dx=0.0,Dy=0.0,FilterType='bilinear',sizingMethod='auto expand')";
						DecoNowCMD2 = rotateCmd;
					}
				}
				if((DecoNowCMD1 != "") ||  (DecoNowCMD2 != ""))
				{
					MoveObjs[midx].style.filter = DecoNowCMD1 + " " + DecoNowCMD2;
				}
//				MoveObjs[midx].style.filter += DecoCMD[parseInt(MoveObjs[midx].style.UDecoration)];
			}
		}
		else
		{
			f_mv_data = MoveObjs[midx].style.F_MV;
			if(f_mv_data != null)
			{
				if(parseInt(f_mv_data) > 0)
				{
					if(MoveStart[midx] == -1)
					{
						MoveObjs[midx].style.MoveLock = 0;
						MoveObjs[midx].attachEvent("onmouseover",MoveLock);
						MoveObjs[midx].attachEvent("onmouseout",MoveUnLock);
					}
					if(MoveObjs[midx].style.MoveLock == 0)
					{
						cti = (-MoveStart[midx] -1);
						ctx = (cti % (CycleMove[parseInt(f_mv_data)].length / 2)) * 2;
						var endFlag = 0;
						if(ctx == 0)
						{
							if(LoopCount[midx] == 0)
							{
								endFlag = 1;
								MoveObjs[midx].style.F_MV = "0";
							}
							else
							{
								LoopCount[midx]--;
							}
						}
						if(endFlag == 0)
						{
							MoveObjs[midx].style.pixelLeft += CycleMove[parseInt(f_mv_data)][ctx];
							MoveObjs[midx].style.pixelTop += CycleMove[parseInt(f_mv_data)][ctx+1];
							MoveStart[midx]--;
						}
					}
				}
			}
		}
	}
}

function RotateFilter(seata)
{
	rotateCmd = "progid:DXImageTransform.Microsoft.Matrix("
				 + "M11=" + String(fCos(seata))
				 + ",M12=" + String(-1 *fSin(seata))
				 + ",M21=" + String(fSin(seata))
				 + ",M22=" + String(fCos(seata))
				 + ",Dx=0.0,Dy=0.0,FilterType='bilinear',sizingMethod='auto expand')";
	return rotateCmd;
}


function MoveLock()
{
	obj = window.event.srcElement;
	obj.style.MoveLock = 1;
}

function MoveUnLock()
{
	obj = window.event.srcElement;
	obj.style.MoveLock = 0;
}




function Init()
{
	var JumpURL;
	var TopFlag;

	if(document.getElementById())
	{
		objs = document.getElementById();
	}
	else
	{
		objs = document.all;
	}


	for(ix = 0;ix < objs.length;ix++)
	{

		if(objs[ix].id.match(/^shopping/))
		{
			if(!document.all.item('DivEditArea'))
			{
				ctx = 5;
				if(objs[ix].style.IK_Price1 != "")
				{
				 	if(objs[ix].style.IK_ST1 == "9")
					{
						ctx--;
					}
				}
				else
				{
					ctx--;
				}


				if(objs[ix].style.IK_Price2 != "")
				{
				 	if(objs[ix].style.IK_ST2 == "9")
					{
						ctx--;
					}
				}
				else
				{
					ctx--;
				}


				if(objs[ix].style.IK_Price3 != "")
				{
				 	if(objs[ix].style.IK_ST3 == "9")
					{
						ctx--;
					}
				}
				else
				{
					ctx--;
				}


				if(objs[ix].style.IK_Price4 != "")
				{
				 	if(objs[ix].style.IK_ST4 == "9")
					{
						ctx--;
					}
				}
				else
				{
					ctx--;
				}


				if(objs[ix].style.IK_Price5 != "")
				{
				 	if(objs[ix].style.IK_ST5 == "9")
					{
						ctx--;
					}
				}
				else
				{
					ctx--;
				}

				if(ctx > 0)
				{
					mesStr = objs[ix].style.IM_Message1;
					if(mesStr != "")
					{
						mesStr = mesStr.replace(/\n/g,"");
						overPop = "<div id=overPop style=\"" +
								  "position : absolute;color : gray;background-color : transparent;font-size : 10px;border-style : solid;border-width : 1px;border-color : #E0F0F0;padding : 2px;" +
								  "left : "  + String(objs[ix].style.pixelLeft + objs[ix].style.pixelWidth - 50)  + "px;" +
								  "top : "	+ String(objs[ix].style.pixelTop - 18)	+ "px;" +
								  "width : 46px;height : 12px;" +
								  "z-index : "	+ String(objs[ix].style.zIndex + 10000 ) + ";" +
								  "IM_Message1 : " + mesStr + ";" +
								  "cursor : pointer;" +
								  "\" onclick=\"disp_product_detail();\" onmouseout=\"reset_product_detail();\"  onmouseover=\"gkcolor_change();\">商品説明</div>";
						objs[ix].insertAdjacentHTML("AfterEnd",overPop);
					}
					photoURL = objs[ix].style.IP_Photo1;
					if(photoURL != "")
					{
						overPop = "<div id=overPop style=\"" +
								  "position : absolute;color : gray;background-color : transparent;font-size : 10px;border-style : solid;border-width : 1px;border-color : #E0F0F0;padding : 2px;" +
								  "left : "  + String(objs[ix].style.pixelLeft + objs[ix].style.pixelWidth - 96)  + "px;" +
								  "top : "	+ String(objs[ix].style.pixelTop - 18)	+ "px;" +
								  "width : 46px;height : 12px;" +
								  "z-index : "	+ String(objs[ix].style.zIndex + 10000 ) + ";" +
								  "photoURL : " + photoURL + ";" +
								  "cursor : pointer;" +
								  "\" onclick=\"popup_picture_for_shopping();\"  onmouseout=\"gkcolor_reset();\" onmouseover=\"gkcolor_change();\">拡大写真</div>";
						objs[ix].insertAdjacentHTML("AfterEnd",overPop);
						objs[ix].attachEvent("onclick",openCartWin);
					}
				}
				else
				{
					overPop = "<div id=overPop style=\"" +
							  "position : absolute;color : red;background-color : transparent;font-size : 12px;border-style : solid;border-width : 1px;border-color : #E0F0F0;padding : 2px;text-align : center;" +
							  "left : "  + String(objs[ix].style.pixelLeft + objs[ix].style.pixelWidth - 96)  + "px;" +
							  "top : "	+ String(objs[ix].style.pixelTop - 18)	+ "px;" +
							  "width : 92px;height : 12px;font-weight :900;" +
							  "z-index : "	+ String(objs[ix].style.zIndex + 10000 ) + ";" +
							  "\">Sold Out</div>";
					objs[ix].insertAdjacentHTML("AfterEnd",overPop);
					objs[ix].style.filter = "Gray";
					objs[ix].style.cursor = "default";
				}
			}
		}
		else if(objs[ix].id.match(/^openCartButton/))
		{
			objs[ix].attachEvent("onclick",OpenCart);
		}
		else if(objs[ix].id.match(/^MenuLinkChild/))
		{
			if(String(objs[ix].style.password) == "undefined")
			{
				objs[ix].style.password = "";
			}
			if(objs[ix].title == "")
			{
				if(objs[ix].style.password != "")
				{
					objs[ix].title = "パスワード付リンク";
				}
				else
				{
					objs[ix].title = "リンク";
				}
			}
			objs[ix].attachEvent("onmouseover",writeTitle);
			objs[ix].attachEvent("onmouseout",eraseTitle);
			objs[ix].attachEvent("onmousedown",downAction);
			objs[ix].attachEvent("onclick",MoveChildURL);
		}
		else if(objs[ix].id.match(/^MenuLink/))
		{
			if(String(objs[ix].style.password) == "undefined")
			{
				objs[ix].style.password = "";
			}
			if(objs[ix].style.password != "")
			{
				if(objs[ix].title == "")
				{
					objs[ix].title = "パスワード付リンク";
				}
			}
			else
			{
				if(objs[ix].title == "")
				{
					objs[ix].title = "リンク";
				}
			}
			objs[ix].attachEvent("onmouseover",writeTitle);
			objs[ix].attachEvent("onmouseout",eraseTitle);
			objs[ix].attachEvent("onmousedown",downAction);
			objs[ix].attachEvent("onclick",MoveURL);
		}
		if(objs[ix].style.sysdisp == "hidden")
		{
			objs[ix].style.display = 'none';
		}
		else if(objs[ix].style.et == "r")
		{
			objs[ix].attachEvent("onclick",callBoard);
		}
		else if(objs[ix].style.et == "s")
		{
			objs[ix].attachEvent("onclick",SendMail);
			document.body.insertAdjacentHTML("BeforeEnd","<IFRAME name=\"sendHTMLmailFrame\" style=\"display : none;\" id=\"sendHTMLmailFrame\" src=\""+ domain +"/WebDirectXP/sendHTMLmailFrame.html\"></IFRAME>");
		}
		else if(objs[ix].style.et == "e")
		{
			objs[ix].attachEvent("onclick",setFavorite);
		}
		else if(objs[ix].style.et == "u")
		{
			objs[ix].attachEvent("onclick",setSendMemo);
		}
		else if(objs[ix].style.et == "m")
		{
			objs[ix].attachEvent("onclick",setSendFriend);
		}
		else if(objs[ix].style.et == "ib")
		{
			OverBar = objs[ix];
		}
		else if(objs[ix].style.et == "p")
		{
			objs[ix].attachEvent("onclick",pulldownmenu);
			objs[ix].attachEvent("onmouseover",mouseover);
			objs[ix].attachEvent("onmouseleave",mouseleave);
			objs[ix].attachEvent("onblur",hidemenu);
			document.body.attachEvent("onclick",hidemenu);
		}

//		if((objs[ix].className == "BUTTON") || (objs[ix].className == "button"))
//		{
//			objs[ix].title = location.href;
//			objs[ix].attachEvent("onmouseover",writeTitle);
//			objs[ix].attachEvent("onmouseout",eraseTitle);
//		}

// コピーガード
		if((objs[ix].tagName == "IMG") && (objs[ix].style.img != "cv") )
		{
			if(!objs[ix].src.match(/banner[^\/\.]*\.gif$/))
			{
				if(1 || objs[ix].parentElement.tagName == "DIV")
				{
					insertObj = "<img style=\"img:cv;position : absolute;" +
						"z-index : "+  objs[ix].style.zIndex  + ";" +
						"left : "	+ objs[ix].style.pixelLeft		+ "px;" +
						"top : "	+ objs[ix].style.pixelTop		+ "px;" +
						"width : "	+ objs[ix].style.pixelWidth		+ "px;" +
						"height : "	+ objs[ix].style.pixelHeight	+ "px;" +
						"border-width : "+ objs[ix].currentStyle.borderWidth	+ ";" +
						"border-style : "+ objs[ix].currentStyle.borderStyle	+ ";" +
						"border-color : "+ objs[ix].currentStyle.borderColor	+ ";" +
					  "\" src=\"../../WebDirectXP/gif/CopyGuard.gif\"" +
					  " alt=\"" + objs[ix].alt + "\" >";
//					  "\" src=\""+ domain + "/WebDirectXP/gif/CopyGuard.gif\">";
					objs[ix].insertAdjacentHTML("AfterEnd", insertObj);
				}
			}
		}


	}
	for(ix = 0;ix < objs.length;ix++)
	{
		var DecoNowCMD1 = "";
		var DecoNowCMD2 = "";
		if(String(objs[ix].style.UDecoration) != "undefined")
		{
			if(String(objs[ix].style.UDecoration).match(/^[^\d]+$/))
			{
				if(!document.all.item('DivEditArea'))
				{
					switch(objs[ix].style.UDecoration)
					{
						case "OLSW" :
							tobj = objs[ix];
							tobj.style.UDecoration = "";
							outlineHTML =  objs[ix].outerHTML;
							mColor = "white";
							for(oidx = 0;oidx < OutLinePos[0].length;oidx+=2)
							{
								tobj.insertAdjacentHTML("BeforeBegin",outlineHTML);
								tobj = tobj.previousSibling;
								tobj.style.color = mColor;
								tobj.style.pixelLeft -= OutLinePos[0][oidx];
								tobj.style.pixelTop -= OutLinePos[0][oidx+1];
							}
							break;
						case "OLGW" :
							tobj = objs[ix];
							tobj.style.UDecoration = "";
							outlineHTML =  objs[ix].outerHTML;
							mColor = "silver";
							for(oidx = 0;oidx < OutLinePos[0].length;oidx+=2)
							{
								tobj.insertAdjacentHTML("BeforeBegin",outlineHTML);
								tobj = tobj.previousSibling;
								tobj.style.color = mColor;
								tobj.style.pixelLeft -= OutLinePos[0][oidx];
								tobj.style.pixelTop -= OutLinePos[0][oidx+1];
							}
							break;
						case "OLBW" :
							tobj = objs[ix];
							tobj.style.UDecoration = "";
							outlineHTML =  objs[ix].outerHTML;
							mColor = "#000000";
							for(oidx = 0;oidx < OutLinePos[0].length;oidx+=2)
							{
								tobj.insertAdjacentHTML("BeforeBegin",outlineHTML);
								tobj = tobj.previousSibling;
								tobj.style.color = mColor;
								tobj.style.pixelLeft -= OutLinePos[0][oidx];
								tobj.style.pixelTop -= OutLinePos[0][oidx+1];
							}
							break;
					}
				}
			}
			else
			{
				DecoNowCMD1 = DecoCMD[parseInt(objs[ix].style.UDecoration)];
			}
		}
		seata = objs[ix].style.URot;
		if(seata != null)
		{
			if(seata != 0)
			{
				seata = -seata;
				rotateCmd = "progid:DXImageTransform.Microsoft.Matrix("
							 + "M11=" + String(fCos(seata))
							 + ",M12=" + String(-1 *fSin(seata))
							 + ",M21=" + String(fSin(seata))
							 + ",M22=" + String(fCos(seata))
							 + ",Dx=0.0,Dy=0.0,FilterType='bilinear',sizingMethod='auto expand')";
				DecoNowCMD2 = rotateCmd;
			}
		}
		if(DecoNowCMD1 != "" || DecoNowCMD2 != "")
		{
			objs[ix].style.filter = DecoNowCMD1 + " " + DecoNowCMD2;
		}
		if((String(objs[ix].style.UAppearance) != "undefined") || (String(objs[ix].style.F_MV) != "undefined"))
		{
			LoopCount[MoveObjsMax] = 0;
			f_mvct_data = objs[ix].style.F_MVCT;
			if(f_mvct_data != null)
			{
				LoopCount[MoveObjsMax] = parseInt(f_mvct_data);
			}
			else
			{
				LoopCount[MoveObjsMax] = -1;
			}

			f_accent_type = objs[ix].style.F_ACCENT;
			if(f_accent_type != null)
			{
				AccentType[MoveObjsMax] = parseInt(f_accent_type);
			}
			else
			{
				AccentType[MoveObjsMax] = 0;
			}

			if(!document.all.item('DivEditArea'))
			{
				if(!objs[ix].id.match(/^Board\d/))
				{
					objs[ix].id = objs[ix].id + "_" + String(ix);
				}
			}

			MoveObjs[MoveObjsMax] = objs[ix];
			if(String(objs[ix].style.UStartSec) == "undefined")
			{
				objs[ix].style.UStartSec = 0;
			}
			MoveStart[MoveObjsMax] = objs[ix].style.UStartSec *30;
			GoulX[MoveObjsMax] = objs[ix].style.pixelLeft;
			GoulY[MoveObjsMax] = objs[ix].style.pixelTop;
			MoveSum[MoveObjsMax] = 0;
			switch(objs[ix].style.UAppearance)
			{
				case 'LMI' :
					StartX[MoveObjsMax] = (objs[ix].style.pixelLeft % 200)-200;
					StartY[MoveObjsMax] = objs[ix].style.pixelTop;
					break;
				case 'RMI' :
					StartX[MoveObjsMax] = Math.ceil((document.body.clientWidth - objs[ix].style.pixelLeft) / 200) * 200 + objs[ix].style.pixelLeft;
					StartY[MoveObjsMax] = objs[ix].style.pixelTop;
					break;
				case 'TMI' :
					StartX[MoveObjsMax] = objs[ix].style.pixelLeft;
					StartY[MoveObjsMax] = (objs[ix].style.pixelTop % 200) - 200;
					break;
				case 'BMI' :
					StartX[MoveObjsMax] = objs[ix].style.pixelLeft;
					StartY[MoveObjsMax] = Math.ceil((document.body.clientHeight - objs[ix].style.pixelTop) / 200) * 200 + objs[ix].style.pixelTop;
					break;
				case 'LFI' :
					StartX[MoveObjsMax] = (objs[ix].style.pixelLeft % 200)-200;
					StartY[MoveObjsMax] = objs[ix].style.pixelTop;
					MoveDiff[MoveObjsMax] = Math.ceil(100/((GoulX[MoveObjsMax] - StartX[MoveObjsMax])/MoveGrid));
					objs[ix].style.filter = "progid:DXImageTransform.Microsoft.Alpha(0)";
					break;
				case 'RFI' :
					StartX[MoveObjsMax] = Math.ceil((document.body.clientWidth - objs[ix].style.pixelLeft) / 200) * 200 + objs[ix].style.pixelLeft;
					StartY[MoveObjsMax] = objs[ix].style.pixelTop;
					MoveDiff[MoveObjsMax] = Math.ceil(100/((StartX[MoveObjsMax] - GoulX[MoveObjsMax])/MoveGrid));
					objs[ix].style.filter = "progid:DXImageTransform.Microsoft.Alpha(0)";
					break;
				case 'TFI' :
					StartX[MoveObjsMax] = objs[ix].style.pixelLeft;
					StartY[MoveObjsMax] = (objs[ix].style.pixelTop % 200) - 200;
					MoveDiff[MoveObjsMax] = Math.ceil(100/((GoulY[MoveObjsMax] - StartY[MoveObjsMax])/MoveGrid));
					objs[ix].style.filter = "progid:DXImageTransform.Microsoft.Alpha(0)";
					break;
				case 'BFI' :
					StartX[MoveObjsMax] = objs[ix].style.pixelLeft;
					StartY[MoveObjsMax] = Math.ceil((document.body.clientHeight - objs[ix].style.pixelTop) / 200) * 200 + objs[ix].style.pixelTop;
					MoveDiff[MoveObjsMax] = Math.ceil(100/((StartY[MoveObjsMax] - GoulY[MoveObjsMax])/MoveGrid));
					objs[ix].style.filter = "progid:DXImageTransform.Microsoft.Alpha(0)";
					break;
				case 'TLZ' :
				case 'TRZ' :
				case 'BLZ' :
				case 'BRZ' :
				case 'CCZ' :
					StartX[MoveObjsMax] = objs[ix].style.pixelWidth;
					StartY[MoveObjsMax] = objs[ix].style.pixelHeight;
					MoveDiff[MoveObjsMax] = 0;
					objs[ix].style.zoom ="0%";
					break;
			}
			MoveObjsMax++;
		}
	}
	if(MoveObjsMax != 0)
	{
		if(!document.all.item('DivEditArea'))
		{
			TimerFlag = setInterval("UClock()",1000/30);
		}
	}
}

function UnInit()
{
	ViewMode = 0;
	objs = document.all;
	for(ix = objs.length - 1;ix >= 0;ix--)
	{
		if(objs[ix].id.match(/^shoppingButton/))
		{
			objs[ix].detachEvent("onclick",openCartWin);
		}
		else if(objs[ix].id.match(/^openCartButton/))
		{
			objs[ix].detachEvent("onclick",OpenCart);
		}
		else if(objs[ix].id.match(/^MenuLink/))
		{
			objs[ix].detachEvent("onclick",MoveURL);
			objs[ix].detachEvent("onmouseover",writeTitle);
			objs[ix].detachEvent("onmouseout",eraseTitle);
		}
		else if(objs[ix].style.et == "s")
		{
			objs[ix].detachEvent("onclick",SendMail);
		}
		else if(objs[ix].style.et == "u")
		{
			objs[ix].detachEvent("onclick",setSendMemo);
		}
		else if(objs[ix].style.et == "e")
		{
			objs[ix].detachEvent("onclick",setFavorite);
		}
		else if(objs[ix].style.et == "m")
		{
			objs[ix].detachEvent("onclick",setSendFriend);
		}
		else if(objs[ix].id.match(/^sendHTMLmailFrame/))
		{
			objs[ix].outerHTML = "";
		}
		else if(objs[ix].style.et == "p")
		{
			objs[ix].detachEvent("onclick",pulldownmenu);
			objs[ix].detachEvent("onmouseover",mouseover);
			objs[ix].detachEvent("onmouseleave",mouseleave);
			objs[ix].detachEvent("onblur",hidemenu);

		}
		try
		{
			if(objs[ix].style.img == "cv")
			{
				objs[ix].outerHTML = "";
			}
		}
		catch(e)
		{
		}
	}
}

function openCartWin()
{
	obj = window.event.srcElement;
	showModalDialog(domain + "/WebDirectXP/Cart1.html",obj,"help: No; resizable: No; status: No;dialogWidth:267px;dialogHeight:230px");
}

function setSendFriend()
{
	obj = unescape(window.event.srcElement.style.homeurl);
//	alert(domain + "/WebDirectXP/friendMailDialog.html");
	showModalDialog(domain + "/WebDirectXP/friendMailDialog.html",obj,"help: No; resizable: No; status: No;dialogWidth:210px;dialogHeight:419px");

}

function setFavorite()
{
	pList = new Array();
	text = unescape(window.event.srcElement.style.param);
	pList = text.split("\x01");

	window.external.addFavorite(pList[0], pList[1]);
}

function setSendMemo()
{
	showModalDialog(domain + "/WebDirectXP/sendMobileMemoDialog.html",event.srcElement,"help: No; resizable: No; status: No;dialogWidth:210px;dialogHeight:419px");

}


function OpenCart()
{
	obj = window.event.srcElement;
	showModalDialog(domain + "/WebDirectXP/shoppingCart.html",obj,"help: No; resizable: No; status: No;dialogWidth:522px;dialogHeight:310px");

}


function callBoard()
{
	obj = window.event.srcElement;
	showModalDialog("/redirect/WebDirectXP/board_A1.shtml",obj,"help: No; resizable: YES; status: No;dialogWidth:700px;dialogHeight:530px");
}

function GetLinkURL()
{
	return JumpURL;
}

function GetTopFlag()
{
	return obj.style.topflag;
}

function MoveURL(obj)
{
	if(ViewMode == 0)
	{
		return;
	}

	obj = window.event.srcElement;

	while(!obj.id.match(/^MenuLink/))
	{
		obj = obj.offsetParent;
	}

	boxInset(obj);

	JumpURL = obj.style.MenuLink;
	if(! JumpURL.match(/^http:\/\//))
	{
		if(JumpURL.match(/userfile\//))
		{
			JumpURL = GetBase() + JumpURL;
			ImageObj.src = JumpURL;
			return;
		}
	}
	TopFlag = obj.style.topflag;

	if(OverBar != null)
	{
		if(LastButton != null)
		{
			LastButton.style.zIndex -= 1000;
		}
		LastButton = obj;
		obj.style.zIndex += 1000;
		OverBar.style.zIndex = obj.style.zIndex - 1;
	}


	if(String(obj.style.password) == "undefined")
	{
		obj.style.password = "";
	}

	if(obj.style.password != "")
	{
		showModalDialog(domain + "/WebDirectXP/checkPasswordDialog.html", sendObj ,"dialogHeight:210px;dialogWidth:310px;resizable = no;scrollbars = no;status = no;titlebar = no;help = no;");
	}
	else
	{
		if(parseInt(obj.style.topflag) == 1)
		{
			if(parseInt(obj.style.dstyle) == 1)
			{
				window.open(JumpURL,"_blank","location = no,menubar = no,toolbar = no,resizable = yes,scrollbars = yes,status = yes,titlebar = yes");
			}
			else
			{
				window.open(JumpURL,"_blank");
			}
		}
		else if(parent.main)
		{
			parent.main.location = JumpURL;
		}
		else
		{
			location = JumpURL;
		}
	}
}

function MoveChildURL(obj)
{
	if(ViewMode == 0)
	{
		return;
	}
	obj = window.event.srcElement;
	while(!obj.id.match(/~MenuLinkChild/))
	{
		obj = obj.offsetParent;
	}

	boxInset(obj);

	JumpURL = window.parent.location + obj.style.MenuLink;
	if(! JumpURL.match(/^http:\/\//))
	{
		if(JumpURL.match(/userfile\//))
		{
			JumpURL = GetBase() + JumpURL;
			ImageObj.src = JumpURL;
			return;
		}
	}
	TopFlag = obj.style.topflag;

	if(OverBar != null)
	{
		if(LastButton != null)
		{
			LastButton.style.zIndex -= 1000;
		}
		LastButton = obj;
		obj.style.zIndex += 1000;
		OverBar.style.zIndex = obj.style.zIndex - 1;
	}

	if(String(obj.style.password) == "undefined")
	{
		obj.style.password = "";
	}

	if(obj.style.password != "")
	{
		showModalDialog(domain + "/WebDirectXP/checkPasswordDialog.html", self ,"dialogHeight:210px;dialogWidth:310px;resizable = no;scrollbars = no;status = no;titlebar = no;help = no;");
	}
	else
	{
		if(parseInt(obj.style.topflag) == 1)
		{
			if(parseInt(obj.style.dstyle) == 1)
			{
				window.open(JumpURL,"_blank","location = no,menubar = no,toolbar = no,resizable = yes,scrollbars = yes,status = yes,titlebar = yes");
			}
			else
			{
				window.open(JumpURL,"_blank");
			}
		}
		else if(parent.main)
		{
			parent.main.location = JumpURL;
		}
		else
		{
			location = JumpURL;
		}
	}
}


function styleCopy(sobj,dobj)
{
	dobj.style.position = "absolute";
	dobj.style.pixelLeft = sobj.style.pixelLeft;
	dobj.style.pixelTop = sobj.style.pixelTop;
	dobj.style.pixelWidth = sobj.style.pixelWidth;
	dobj.style.pixelHeight = sobj.style.pixelHeight;
	dobj.style.borderWidth = 1;
	dobj.style.borderColor = "gray";
	dobj.style.borderStyle = "solid";
}



function SendMail()
{

	objs = document.body.all;
	var Error = 0;
	var KeepID;
	for(idx = 0;idx < objs.length;idx++)
	{
		if(String(objs[idx].style.must) != "undefined")
		{
			switch(objs[idx].tagName)
			{
				case "input" :
				case "INPUT" :
					if(objs[idx].value == "")
					{
						KeepID = idx;
						Error = 1;
					}
					else
					{
//						objs[idx].disabled = true;
					}
					break;
				case "textarea" :
				case "TEXTAREA" :
					if(objs[idx].innerText == "")
					{
						KeepID = idx;
						Error = 1;
					}
					break;
			}

		}
	}

	if(Error == 1)
	{
		alert("入力されていません。");
		objs[KeepID].select();
		return;
	}

//	for(idx = objs.length - 1;idx >= 0;idx--)
//	{
//		var sid="IM" + String(idx);
//		switch(objs[idx].tagName)
//		{
//			case "input" :
//			case "INPUT" :
//				switch(objs[idx].type)
//				{
//					case 'text':
//					case 'TEXT':
//						document.body.insertAdjacentHTML("BeforeEnd","<DIV id=" + sid + "></DIV>");
//						styleCopy(objs[idx],document.all.item(sid));
//						document.all.item(sid).insertAdjacentHTML("BeforeEnd",objs[idx].value);
//						objs[idx].outerHTML = "";
//						break;
//					case 'checkbox':
//					case 'CHECKBOX':
//						var sobj = objs[idx].offsetParent;
//						if(objs[idx].checked)
//						{
//							document.body.insertAdjacentHTML("BeforeEnd","<DIV id=" + sid + ">◎</DIV>");
//						}
//						else
//						{
//							document.body.insertAdjacentHTML("BeforeEnd","<STRIKE id=" + sid + ">□</STRIKE>");
//						}
//						styleCopy(sobj,document.all.item(sid));
//						objs[idx].outerHTML = "";
//						document.all.item(sid).insertAdjacentHTML("BeforeEnd",sobj.innerHTML);
//						sobj.outerHTML = "";
//						break;
//					case 'radio':
//					case 'RADIO':
//						if(objs[idx].checked)
//						{
//							objs[idx].outerHTML = "◎";
//						}
//						else
//						{
//							objs[idx].outerHTML = "□";
//						}
//						break;
//				}
//				break;
//			case "textarea" :
//			case "TEXTAREA" :
//				document.body.insertAdjacentHTML("BeforeEnd","<DIV id=" + sid + "></DIV>");
//				styleCopy(objs[idx],document.all.item(sid));
//				document.all.item(sid).innerHTML = objs[idx].innerHTML;
//				objs[idx].outerHTML = "";
//				break;
//			case "select" :
//			case "SELECT" :
//				document.body.insertAdjacentHTML("BeforeEnd","<DIV id=" + sid + "></DIV>");
//				objs[idx].style.pixelHeight = 20;
//				styleCopy(objs[idx],document.all.item(sid));
//				document.all.item(sid).innerHTML = objs[idx].options[objs[idx].selectedIndex].text;
//				objs[idx].outerHTML = "";
//				break;
//		}
//	}

//	alert(document.body.innerHTML);

	obj = event.srcElement;
	var html = document.body.innerHTML;
	var Doc = document.frames('sendHTMLmailFrame').document;
	Doc.all.item('$html').value = html;
	Doc.all.item('$sender').value = obj.style.mail_sender;
	Doc.all.item('$subject').value = obj.style.mail_subject;
	Doc.all.item('$to').value = obj.style.mail_to;
	Doc.all.item('$cc').value = obj.style.mail_cc;
	Doc.all.item('$nextURL').value = obj.style.mail_nextURL;
	Doc.all.item('$baseURL').value = window.location;
	Doc.all.item('sendHTMLmai').submit();
}


function WriteInto(html)
{
	document.all.item("design").insertAdjacentHTML("beforeEnd",html);
}

function writeTitle()
{
	obj = window.event.srcElement;

	while(!obj.id.match(/^MenuLink/))
	{
		obj = obj.offsetParent;
	}
	if(!document.all.item('DivEditArea'))
	{
		if(obj.style.ro)
		{
			switch(obj.style.ro)
			{
				case "9" :
					obj.style.borderStyle = "outset";
					break;
				case "10" :
					obj.style.borderStyle = "outset";
					break;
				case "11" :
					saveLineStyle = obj.style.borderStyle;
					saveColor = obj.style.backgroundColor;

					obj.style.backgroundColor = obj.style.borderColor;
					obj.style.borderStyle = "outset";

					break;
			}
		}
	}
	window.status = obj.style.MenuLink;
}

function eraseTitle()
{
	obj = window.event.srcElement;
	while(!obj.id.match(/^MenuLink/))
	{
		obj = obj.offsetParent;
	}
	if(!document.all.item('DivEditArea'))
	{
		if(obj.style.ro)
		{
			switch(obj.style.ro)
			{
				case "9" :
					obj.style.borderStyle = "solid";
					break;
				case "10" :
					obj.style.borderStyle = "outset";
					break;
				case "11" :
					obj.style.backgroundColor = saveColor;
					obj.style.borderStyle = saveLineStyle;
					break;
			}
		}
	}
	window.status = "";
}

function boxInset(obj)
{
	if(!document.all.item('DivEditArea'))
	{
		if(obj.style.ro)
		{
			switch(obj.style.ro)
			{
				case "9" :
					obj.style.borderStyle = "inset";
				break;
				case "10" :
					obj.style.borderStyle = "inset";
				break;
				case "11" :
					obj.style.borderStyle = "inset";
				break;
			}
		}
	}
}

function downAction()
{
	obj = window.event.srcElement;
	while(!obj.id.match(/^MenuLink/))
	{
		obj = obj.offsetParent;
	}
	boxInset(obj)
}

var LastLeft = 0;
function disp_product_detail()
{
	obj = window.event.srcElement;
	if(obj.style.pixelWidth < 200)
	{
		LastLeft = obj.style.pixelLeft;
		if(obj.style.pixelLeft > 350)
		{
			obj.style.pixelLeft -= 170;
		}
		obj.style.pixelWidth  = 213;
		obj.style.pixelHeight  = 117;
		obj.style.fontSize	= 12;
		obj.style.zIndex  += 100000;
		obj.color = "#404040"
		obj.style.backgroundColor = "#ccffee";
		obj.style.borderColor = "red";

		mesStr = obj.style.IM_Message1;
		mesStr = mesStr.replace(/&lt;/g,"<");
		mesStr = mesStr.replace(/&gt;/g,">");
		mesStr = mesStr.replace(/<br>/g,"\n");
		obj.innerHTML = mesStr;
	}

}

function reset_product_detail()
{
	obj = window.event.srcElement;
	if(obj.style.pixelWidth > 200)
	{
		obj.style.pixelLeft = LastLeft;
		obj.style.pixelWidth  = 46;
		obj.style.pixelHeight  = 12;
		obj.style.fontSize	= 10;
		obj.style.zIndex  -= 100000;
		obj.color = "gray"
		obj.style.backgroundColor = "transparent";
		obj.style.borderColor = "#E0F0F0";
		obj.style.borderStyle = 'solid';
		obj.innerHTML = "商品説明";
	}
	else
	{
		obj.style.backgroundColor = 'transparent';
		obj.style.borderColor = '#E0F0F0';
		obj.style.borderStyle = 'solid';
	}
}

function popup_picture()
{
	obj = window.event.srcElement;

	photoURL = obj.style.photoURL;
	if(photoURL.match(/userfile\//))
	{
		photoURL = GetBase() + photoURL;
	}

	ImageObj.src = photoURL;

//	window.open(photoURL,"_blank","width=640,height=480,location = no,menubar = no,toolbar = no,resizable = yes,scrollbars = yes,status = yes,titlebar = yes");
}

function ImageLoadEnd()
{
	iH = ImageObj.height + 90;
	iW = ImageObj.width + 15;
	durl = domain + "/WebDirectXP/displayImage.html";
	opt = "status:no;help:no;scroll:no;resizable:no;dialogWidth:" + String(iW) + "px;" + "dialogHeight:" + String(iH) + "px;";

	showModalDialog(durl ,ImageObj,opt);
}


var TObj;
function popup_picture_for_shopping()
{
	obj = window.event.srcElement;

	photoURL = obj.style.photoURL;

	if(photoURL.match(/userfile\//))
	{
		photoURL = GetBase() + photoURL;
	}

	TObj = obj;
	ImageObj_for_shopping.src = photoURL;

//	window.open(photoURL,"_blank","width=640,height=480,location = no,menubar = no,toolbar = no,resizable = yes,scrollbars = yes,status = yes,titlebar = yes");
}

function ImageLoadEnd_for_shopping()
{
	iH = ImageObj_for_shopping.height + 190;
	iW = ImageObj_for_shopping.width + 35;


	durl = domain + "/WebDirectXP/ShoppingImage.html";

	opt = "status:no;help:no;scroll:auto;resizable:yes;dialogWidth:" + String(iW) + "px;" + "dialogHeight:" + String(iH) + "px;";

	var sendParam = new Object();
	sendParam.image = ImageObj_for_shopping;
	sendParam.obj = TObj;

	showModalDialog(durl,sendParam,opt);
}


function gkcolor_change()
{
	obj = window.event.srcElement;
	if(obj.style.pixelWidth < 200)
	{
		obj.style.backgroundColor = 'pink';
		obj.style.borderColor = 'pink';
		obj.style.borderStyle = 'outset';
	}
}

function gkcolor_reset()
{
	obj = window.event.srcElement;
	if(obj.style.pixelWidth < 200)
	{
		obj.style.backgroundColor = 'transparent';
		obj.style.borderColor = '#E0F0F0';
		obj.style.borderStyle = 'solid';
	}
}

var counterOnce = 0;
function LoadCounter(obj,url)
{
	if(counterOnce == 0)
	{
		counterOnce = 1;
		if(!document.all.item('DivEditArea'))
		{
			obj.src = url + "&amp;$referer=" + document.referrer;
		}
		else
		{
			obj.src = url;
		}
	}
}


function Test(Mes)
{
	alert(Mes);
}

function calcolor()
{
	if(ViewMode == 0)
	{
		if(window.event.srcElement.style.backgroundColor == "")
		{
			window.event.srcElement.style.backgroundColor = 'pink';
		}
		else if(window.event.srcElement.style.backgroundColor == "pink")
		{
			window.event.srcElement.style.backgroundColor = 'aqua';
		}
		else if(window.event.srcElement.style.backgroundColor == "aqua")
		{
			window.event.srcElement.style.backgroundColor = 'transparent';
		}
		else if(window.event.srcElement.style.backgroundColor == "transparent")
		{
			window.event.srcElement.style.backgroundColor = 'pink';
		}
	}
}

function eventCancel()
{
	window.event.cancelBubble = true;
	window.event.returnValue = false;
}

var activeMenuObj = null;
var activeChildObj = null;

function mouseoverchild()
{
	checkObj = window.event.srcElement;
	if(checkObj != null)
	{
		while(checkObj.tagName == 'SPAN')
		{
			checkObj = checkObj.offsetParent;
		}
		if(checkObj != activeChildObj)
		{
			mouseleavechild();
			activeChildObj = checkObj;
			activeChildObj.style.bkbkColor = activeChildObj.style.backgroundColor;
			activeChildObj.style.backgroundColor = 'blue';
			activeChildObj.style.color = 'white';
			activeChildObj.style.borderStyle = 'outset';
			activeChildObj.style.borderColor = 'white';
		}
	}
}

function mouseleavechild()
{
	if(activeChildObj != null)
	{
		activeChildObj.style.backgroundColor = activeChildObj.style.bkbkColor;
		activeChildObj.style.color = 'black';
		activeChildObj.style.borderStyle = 'inset';
		activeChildObj.style.borderColor = '#B0B0B0';
	}
}

function moveurl()
{
	checkObj = window.event.srcElement;
	while(checkObj.tagName == 'SPAN')
	{
		checkObj = checkObj.offsetParent;
	}
	objs = checkObj.children;
	window.open(objs[1].innerText,'_self');
}

function pulldownmenu()
{
	obj = window.event.srcElement;
	while(obj.tagName == 'SPAN')
	{
		obj = obj.offsetParent;
	}
	if(obj.className == 'menuItem')
	{
		obj = obj.offsetParent;
	}
	if(activeMenuObj != null)
	{
		hidemenusub();
	}
	mouseover();
	var childTop = obj.style.pixelHeight + 2;
	objs = obj.children;
	if(obj.style.mtype == 'down')
	{
		childTop = obj.style.pixelHeight + 2;
		childLeft = 0;
	}
	else if(obj.style.mtype == 'right')
	{
		childTop = 0;
		childLeft = obj.style.pixelWidth + 2;
	}


	for(idx = 0;idx < objs.length;idx++)
	{
		objs[idx].style.pixelTop = childTop;
		objs[idx].style.pixelLeft = childLeft;
		childTop += 24;
		objs[idx].style.width ='150%';
		objs[idx].style.height ='22px';
		objs[idx].onmouseover = mouseoverchild;
		objs[idx].onmouseleave = mouseleavechild;
		objs[idx].onmousedown = moveurl;
	}
	activeMenuObj = obj;
	obj.style.menuon = 2;
	window.event.returnValue = true;
	window.event.cancelBubble = true;
}

function hidemenusub()
{
	if(activeMenuObj != null)
	{
		if(activeMenuObj.style.menuon >= 1)
		{
			activeMenuObj.style.backgroundColor = activeMenuObj.style.bkbkColor;
			activeMenuObj.style.color = activeMenuObj.style.bkColor;
			activeMenuObj.style.menuon = 0;
			objs = activeMenuObj.children;
			for(idx = objs.length-1;idx >= 0 ;idx--)
			{
				objs[idx].style.width ='0%';
				objs[idx].style.height ='0px';
			}
			activeMenuObj = null;
		}
	}
}

function hidemenu()
{
	if(activeMenuObj != null)
	{
		if(activeMenuObj.style.menuon >= 1)
		{
			activeMenuObj.style.backgroundColor = activeMenuObj.style.bkbkColor;
			activeMenuObj.style.color = activeMenuObj.style.bkColor;
			activeMenuObj.style.menuon = 0;
			objs = activeMenuObj.children;
			for(idx = objs.length-1;idx >= 0 ;idx--)
			{
				objs[idx].style.width ='0%';
				objs[idx].style.height ='0px';
			}
			activeMenuObj = null;
		}
	}
}


function mouseover()
{
	obj = window.event.srcElement;
	while(obj.tagName == 'SPAN')
	{
		obj = obj.offsetParent;
	}
	if(obj.className == 'menuItem')
	{
		obj = obj.offsetParent;
	}
	if(activeMenuObj != null)
	{
		obj.click();
	}
	else
	{
		if(obj.style.menuon == 0)
		{
			obj.style.bkbkColor = obj.style.backgroundColor;
			obj.style.bkColor = obj.style.color;
			obj.style.backgroundColor = 'blue';
			obj.style.color = 'white';
			obj.style.menuon = 1;
		}
	}
}

function mouseleave()
{
	obj = window.event.srcElement;
	if(obj.style.menuon == 1)
	{
		obj.style.backgroundColor = obj.style.bkbkColor;
		obj.style.color = obj.style.bkColor;
		obj.style.menuon = 0;
	}
}



