function MagicShowTypeC() {
};
MagicShowTypeC.onImageError = function() {
	if (this.src.indexOf('hosting.dinodirect.com') == -1 && this.src.indexOf('p.lefux.com') > 0) {
		this.src=this.src.replace('p.lefux.com/', 'hosting.dinodirect.com/hosting/');
	}
	
	if (this.src.indexOf('gemsimage.lefux.com') == -1 && this.src.indexOf('hosting.dinodirect.com') > 0) {
		this.src=this.src.replace('hosting.dinodirect.com', 'gemsimage.lefux.com');
	}
	//this.src=this.src.replace("/ms/msimages/","/ms1/msimages/");
};
MagicShowTypeC.info = {
    name : "TypeC",
    version: '0.01.0900',
    date: '2009-02-20',
    author: 'ggkl'
};
MagicShowTypeC.ModeType = {Normal: 1, OverFlow: 2, ToNormal: 3, ToOverFlow: 4};


MagicShowTypeC.onBigImgLoad = function() {
    MagicShowTypeC.bBigLoaded = true;
	MagicShowTypeC.MidImageShow();
};
MagicShowTypeC.onMidImgLoad = function() {
    MagicShowTypeC.bMidLoaded = true;
	MagicShowTypeC.MidImageShow();
};

MagicShowTypeC.MidImageShow = function() {
	if(MagicShowTypeC.bMidLoaded && MagicShowTypeC.bBigLoaded) {
		MagicShowTypeC.midshowobj.style.backgroundImage = "url(" + MagicShowTypeC.midloadingobj.src + ")";
		if (MagicShow.browser.opera) {
			MagicShowTypeC.midshowobj.innerHTML = MagicShowTypeC.midloadingobj.src;
			MagicShowTypeC.midshowobj.innerHTML = "";
		}
	}
};

MagicShowTypeC.BigImageShow = function() {
    MagicShowTypeC.containerobj.style.backgroundImage = "url(" + MagicShowTypeC.bigloadingobj.src + ")";
	MagicShowTypeC.containerobj.style.display = '';
    MagicShowTypeC.bigshowobj.style.display = '';
    offset = MagicShow.getOffset(MagicShowTypeC.midshowobj);

	moff = MagicShow.getOffset(MagicShowTypeC.midshowobj);
	left1 = moff.offsetLeft + parseInt((MagicShowTypeC.midshowobj.offsetWidth - MagicShowTypeC.midloadingobj.width) / 2);
	top1 = moff.offsetTop + parseInt((MagicShowTypeC.midshowobj.offsetHeight - MagicShowTypeC.midloadingobj.height) / 2);

	left2 = moff.offsetLeft + parseInt((MagicShowTypeC.midshowobj.offsetWidth - MagicShowTypeC.bigloadingobj.width) / 2);
	top2 = moff.offsetTop + parseInt((MagicShowTypeC.midshowobj.offsetHeight - MagicShowTypeC.bigloadingobj.height) / 2);
	left2 = Math.max(left2, 0);
	top2 = Math.max(top2, 0);

	sinfo = {left: left1, top: top1};
	einfo = {left: left2, top: top2};

	MagicShow.ImageFilter.show(MagicShowTypeC.bigshowobj, einfo, sinfo, 200);

	sinfo = {width: MagicShowTypeC.midloadingobj.width, height: MagicShowTypeC.midloadingobj.height};
	einfo = {width: MagicShowTypeC.bigloadingobj.width, height: MagicShowTypeC.bigloadingobj.height};
	MagicShow.ImageFilter.show(MagicShowTypeC.containerobj, einfo, sinfo, 200, function(){MagicShowTypeC.Mode = MagicShowTypeC.ModeType.OverFlow;});
};

MagicShowTypeC.MagicShow = null;

MagicShowTypeC.bigloadingobj = null;
MagicShowTypeC.midloadingobj = null;

MagicShowTypeC.bBigLoaded = false;
MagicShowTypeC.bMidLoaded = false;
MagicShowTypeC.Mode = MagicShowTypeC.ModeType.Normal;

MagicShowTypeC.bigimgshowid = "BigImgPicShow";
MagicShowTypeC.bigimgshowobj = null;
MagicShowTypeC.bigshowid = "BigPicShow";
MagicShowTypeC.bigshowobj = null;
MagicShowTypeC.midshowid = "MidPicShow";
MagicShowTypeC.midshowobj = null;
MagicShowTypeC.divMidPointid = "divMidPoint";
MagicShowTypeC.divMidPointobj = null;
MagicShowTypeC.smallscrollid = "SmallScroll";

//MagicShowTypeC.overlayerid = "OverLayer";
//MagicShowTypeC.overlayerobj = null;
MagicShowTypeC.containerid = "Container";
MagicShowTypeC.containerobj = null;

MagicShowTypeC.smallimgs = 4;
MagicShowTypeC.smallimgid = "SmallPicShow";
MagicShowTypeC.smallimgids = [];
MagicShowTypeC.smallimgobjs = [];
MagicShowTypeC.smallpage = 0;
MagicShowTypeC.smallpages = 0;
MagicShowTypeC.smalloffset = 0;
MagicShowTypeC.currimg = -1;
MagicShowTypeC.smallimgobjid = "smallimg";
MagicShowTypeC.smallimgloadobjs = [];

MagicShowTypeC.onMouseScroll = function(event) {
    event = event || window.event;

    var direct = 0;
    if (event.wheelDelta)
        direct = event.wheelDelta > 0 ? -1 : 1;
    else if (event.detail)
        direct = event.detail < 0 ? -1 : 1;

    //MagicShowTypeC.ChangeImageByStep(direct);
    MagicShowTypeC.ChangePage(direct);

    MagicShow.doane(event);
};

MagicShowTypeC.ChangeImageByStep = function(direct) {

    if (MagicShowTypeC.currimg + direct < MagicShowTypeC.MagicShow.msSmallImg.length && MagicShowTypeC.currimg + direct >= 0) {
        var iindex = (MagicShowTypeC.currimg + direct + MagicShowTypeC.smallimgs) % MagicShowTypeC.smallimgs;

        if ((iindex == 0 && direct == 1) || (MagicShowTypeC.currimg % MagicShowTypeC.smallimgs == 0 && direct == -1))
            MagicShowTypeC.ChangePage(direct, iindex);
        else
            MagicShowTypeC.ChangeImage(iindex);
    }
};

MagicShowTypeC.ChangeImage = function(index) {
	var CurPosationIndex = index;//CurPosationIndex is Current <li> Posation 2009-12-16 
	MagicShow.ImageFilter.stop();
	soffset = MagicShowTypeC.smalloffset;

	if (index == MagicShowTypeC.smallimgs - 1 && MagicShowTypeC.MagicShow.msSmallImg.length > MagicShowTypeC.smallimgs) {
		
		index += MagicShowTypeC.smalloffset;
		soffset = Math.min(soffset + 1, MagicShowTypeC.MagicShow.msSmallImg.length - MagicShowTypeC.smallimgs);

		for (var i=0; i < MagicShowTypeC.smallimgs; i++) {
			MagicShowTypeC.smallimgloadobjs[i].src = MagicShowTypeC.MagicShow.msSmallImg[soffset + i];
			MagicShowTypeC.smallimgobjs[i].parentNode.style.display = "";
		}
		MagicShowTypeC.smalloffset = soffset;
	} else if (index == 0 && soffset != 0) {
		
		index += MagicShowTypeC.smalloffset;
		soffset = Math.max(soffset - 1, 0);

		for (var i=0; i < MagicShowTypeC.smallimgs; i++) {
			MagicShowTypeC.smallimgloadobjs[i].src = MagicShowTypeC.MagicShow.msSmallImg[soffset + i];
			MagicShowTypeC.smallimgobjs[i].parentNode.style.display = "";
		}
		MagicShowTypeC.smalloffset = soffset;
	}else
	{
		index += MagicShowTypeC.smalloffset;	
	}
	
    if (MagicShowTypeC.currimg == index || index >= MagicShowTypeC.MagicShow.msSmallImg.length)
        return;

	//Disable button start
	if(index == 0 && soffset == 0)
	{
		document.getElementById("btnpre").className = "pro_0302_btn pro_0302_btn_prveH";
	}
	else
	{
		document.getElementById("btnpre").className = "pro_0302_btn pro_0302_btn_prve";
	}
	if(((index+1) == MagicShowTypeC.MagicShow.msSmallImg.length))
	{
		document.getElementById("btnnext").className = "pro_0302_btn pro_0302_btn_nextH";
	}
	else
	{
		document.getElementById("btnnext").className = "pro_0302_btn pro_0302_btn_next";
	}
	//Disable button end

    MagicShowTypeC.smallimgobjs[Math.max(MagicShowTypeC.currimg, 0) % MagicShowTypeC.smallimgs].parentNode.className = "pro_0302_simg_C";
	MagicShowTypeC.previmg = MagicShowTypeC.currimg;
    MagicShowTypeC.currimg = index;
    //MagicShowTypeC.smallimgobjs[MagicShowTypeC.currimg % MagicShowTypeC.smallimgs].parentNode.className = "pro_0302_cur_img";
	//alert(CurPosationIndex+"***"+ MagicShowTypeC.currimg+"///"+MagicShowTypeC.MagicShow.msSmallImg.length);
	
	//add smallImg selected style 2009-12-16 begin  
	if(CurPosationIndex==3 && MagicShowTypeC.currimg==MagicShowTypeC.MagicShow.msSmallImg.length-1)
	{
		MagicShowTypeC.smallimgobjs[3].className = "pro_0302_simg_CCur";
		MagicShowTypeC.smallimgobjs[2].className = "pro_0302_simg_C";
		MagicShowTypeC.smallimgobjs[1].className = "pro_0302_simg_C";
		MagicShowTypeC.smallimgobjs[0].className = "pro_0302_simg_C";
	}
	else if(CurPosationIndex==3 && MagicShowTypeC.currimg!=MagicShowTypeC.MagicShow.msSmallImg.length-1)
	{
		MagicShowTypeC.smallimgobjs[2].className = "pro_0302_simg_CCur";
		MagicShowTypeC.smallimgobjs[0].className = "pro_0302_simg_C";
		MagicShowTypeC.smallimgobjs[1].className = "pro_0302_simg_C";
		MagicShowTypeC.smallimgobjs[3].className = "pro_0302_simg_C";
	}
	else if(CurPosationIndex==0 && MagicShowTypeC.currimg!=0)
	{
		MagicShowTypeC.smallimgobjs[1].className = "pro_0302_simg_CCur";	
		MagicShowTypeC.smallimgobjs[0].className = "pro_0302_simg_C";	
		MagicShowTypeC.smallimgobjs[2].className = "pro_0302_simg_C";	
		MagicShowTypeC.smallimgobjs[3].className = "pro_0302_simg_C";	
	}
	else if(CurPosationIndex==0 && MagicShowTypeC.currimg==0)
	{
		MagicShowTypeC.smallimgobjs[0].className = "pro_0302_simg_CCur";	
		MagicShowTypeC.smallimgobjs[1].className = "pro_0302_simg_C";	
		MagicShowTypeC.smallimgobjs[2].className = "pro_0302_simg_C";	
		MagicShowTypeC.smallimgobjs[3].className = "pro_0302_simg_C";	
	}
	else
	{
		MagicShowTypeC.smallimgobjs[CurPosationIndex].className = "pro_0302_simg_CCur";	
		for(var i=0;i<4;i++)
		{
			if(i!=CurPosationIndex)
			{
				MagicShowTypeC.smallimgobjs[i].className = "pro_0302_simg_C";	
			}
		}
	}
	//add smallImg selected style 2009-12-16 end  
	
    //MagicShowTypeC.bigimgshowobj.src = "";
    //document.getElementById('currimg').innerHTML = String(MagicShowTypeC.currimg + 1);
    MagicShowTypeC.bigshowobj.style.backgroundImage = "";
    MagicShowTypeC.midshowobj.style.backgroundImage = "";

    MagicShowTypeC.bBigLoaded = false;
    MagicShowTypeC.bMidLoaded = false;
    MagicShowTypeC.midloadingobj.src = MagicShowTypeC.MagicShow.msMidImg[index];
    MagicShowTypeC.bigloadingobj.src = MagicShowTypeC.MagicShow.msBigImg[index];

    //if (MagicShowTypeC.Mode != MagicShowTypeC.ModeType.Normal)
    //    MagicShowTypeC.bigloadingobj.src = MagicShowTypeC.MagicShow.msBigImg[index];

    if (MagicShow.browser.opera) {
        MagicShowTypeC.midshowobj.innerHTML = this.src;
        MagicShowTypeC.midshowobj.innerHTML = "";
        MagicShowTypeC.bigshowobj.innerHTML = this.src;
        MagicShowTypeC.bigshowobj.innerHTML = "";
    }

};

MagicShowTypeC.ChangePage = function(index, imgindex) {
	ioffset = Math.max(0, MagicShowTypeC.currimg + index - MagicShowTypeC.smalloffset);
	ioffset = Math.min(ioffset, MagicShowTypeC.smallimgs - 1);
	MagicShowTypeC.ChangeImage(ioffset);
    /*imgindex = imgindex || 0;
    index += MagicShowTypeC.smallpage;
    index = Math.min(MagicShowTypeC.smallpages - 1, Math.max(index, 0));
    if (MagicShowTypeC.smallpage != index) {
        MagicShowTypeC.smallpage = index;
        MagicShowTypeC.ChangeImage(imgindex);
    }
    else
        MagicShowTypeC.smallpage = index;

    index = index * MagicShowTypeC.smallimgs;
    for (var i=0; i < MagicShowTypeC.smallimgs; i++) {
        if (index + i < MagicShowTypeC.MagicShow.msSmallImg.length) {
           // MagicShowTypeC.smallimgobjs[i].style.backgroundImage = "url(" + MagicShowTypeC.MagicShow.msSmallImg[index + i] + ")";
             MagicShowTypeC.smallimgloadobjs[i].src = MagicShowTypeC.MagicShow.msSmallImg[index + i];
			MagicShowTypeC.smallimgobjs[i].parentNode.style.display = "";
        }
        else {
            MagicShowTypeC.smallimgobjs[i].style.backgroundImage = "";
            MagicShowTypeC.smallimgobjs[i].parentNode.style.display = "none";
        }
    }*/
};

MagicShowTypeC.gotoNormalMode = function(){
    MagicShow.ImageFilter.stop();
    MagicShowTypeC.ShowOverLayer(false);
};

MagicShowTypeC.ShowOverLayer = function(swOver) {
    sels = document.getElementsByTagName('select');
	
    if (MagicShowTypeC.Mode == MagicShowTypeC.ModeType.ToNormal) {
        return;
    }

    if (MagicShowTypeC.Mode == MagicShowTypeC.ModeType.ToOverFlow) {
        MagicShowTypeC.Mode = MagicShowTypeC.ModeType.Normal;
        MagicShowTypeC.bigshowobj.style.display = 'none';

        MagicShowTypeC.bigshowobj.style.left = '0px';
        MagicShowTypeC.bigshowobj.style.top = '0px';
        MagicShowTypeC.containerobj.style.width = '0px';
        MagicShowTypeC.containerobj.style.height = '0px';
        for (var i=0; i<sels.length; i++) {
            sels[i].style.visibility = '';
        }
        return;
    }

    //MagicShowTypeC.bigshowobj.style.display = 'none';
    //MagicShowTypeC.overlayerobj.style.width = MagicShow.width(document) + 'px';
    //MagicShowTypeC.overlayerobj.style.height = MagicShow.height(document) + 'px';
    //MagicShowTypeC.containerobj.style.width = MagicShow.width(document) + 'px';
    //MagicShowTypeC.containerobj.style.height = MagicShow.height(document) + 'px';
    if (swOver) {
		MagicShowTypeC.midshowobj.style.cursor = "";
        //MagicShowTypeC.overlayerobj.style.display = '';
		document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.bigshowid).onclick=function(){MagicShowTypeC.gotoNormalMode();}; //fixed doubel click
        for (var i=0; i<sels.length; i++) {
            sels[i].style.visibility = 'hidden';
        }
        MagicShowTypeC.Mode = MagicShowTypeC.ModeType.ToOverFlow;
		MagicShowTypeC.BigImageShow();
    } else {
		MagicShowTypeC.midshowobj.style.cursor = "url(" + "../images/ZoomIn.cur" + "),url(" + "../images/ZoomIn.cur" + "),auto";
        MagicShowTypeC.Mode = MagicShowTypeC.ModeType.ToNormal;

        moff = MagicShow.getOffset(MagicShowTypeC.midshowobj);
        left1 = moff.offsetLeft + parseInt((MagicShowTypeC.midshowobj.offsetWidth - MagicShowTypeC.midloadingobj.width) / 2);
        top1 = moff.offsetTop + parseInt((MagicShowTypeC.midshowobj.offsetHeight - MagicShowTypeC.midloadingobj.height) / 2);

        left2 = moff.offsetLeft + parseInt((MagicShowTypeC.midshowobj.offsetWidth - MagicShowTypeC.bigloadingobj.width) / 2);
        top2 = moff.offsetTop + parseInt((MagicShowTypeC.midshowobj.offsetHeight - MagicShowTypeC.bigloadingobj.height) / 2);
        left2 = Math.max(left2, 0);
        top2 = Math.max(top2, 0);

        sinfo = {left: left2, top: top2};
        einfo = {left: left1, top: top1};

        MagicShow.ImageFilter.show(MagicShowTypeC.bigshowobj, einfo, sinfo, 200);

        sinfo = {width: MagicShowTypeC.bigloadingobj.width, height: MagicShowTypeC.bigloadingobj.height};
        einfo = {width: MagicShowTypeC.midloadingobj.width, height: MagicShowTypeC.midloadingobj.height};
        MagicShow.ImageFilter.show(MagicShowTypeC.containerobj, einfo, sinfo, 200, function(){MagicShowTypeC.Mode = MagicShowTypeC.ModeType.Normal; MagicShowTypeC.bigshowobj.style.display = 'none';});

        //MagicShowTypeC.overlayerobj.style.display = 'none';
        //MagicShowTypeC.containerobj.style.display = 'none';
		document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.bigshowid).onclick=function(){};	 //fixed doubel click
        for (var i=0; i<sels.length; i++) {
            sels[i].style.visibility = '';
        }
    }
};


MagicShowTypeC.init0 = function(){
    MagicShow.addEvent(MagicShowTypeC.midshowobj, "click", function(event){
        if(MagicShowTypeC.bMidLoaded && MagicShowTypeC.bBigLoaded) {
            //window.scrollTo(0, 0);
			event = event || window.event;
			target = event.target || event.srcElement;
			if( target.id != "viewMoreImage"){
            	MagicShowTypeC.ShowOverLayer(true);
			}
            //MagicShowTypeC.bigloadingobj.src = "";
            //MagicShowTypeC.bigloadingobj.src = MagicShowTypeC.MagicShow.msBigImg[MagicShowTypeC.currimg];
        }
    });

    /*MagicShow.addEvent(MagicShowTypeC.containerobj, "click", function(){
        MagicShow.ImageFilter.stop();
        MagicShowTypeC.Mode = MagicShowTypeC.ModeType.Normal;
        MagicShowTypeC.ShowOverLayer(false);
    });*/
};

MagicShowTypeC.init = function(obj){
    MagicShowTypeC.MagicShow = obj;
    MagicShowTypeC.smallpage = 0;
    MagicShowTypeC.smallpages = parseInt(MagicShowTypeC.MagicShow.msSmallImg.length / MagicShowTypeC.smallimgs) + (MagicShowTypeC.MagicShow.msSmallImg.length % MagicShowTypeC.smallimgs == 0 ? 0 : 1);

    MagicShowTypeC.bigloadingobj = document.createElement("img");
    MagicShowTypeC.midloadingobj = document.createElement("img");
    MagicShowTypeC.bigloadingobj.onload = MagicShowTypeC.onBigImgLoad;
    MagicShowTypeC.midloadingobj.onload = MagicShowTypeC.onMidImgLoad;
	MagicShowTypeC.bigloadingobj.onerror=MagicShowTypeC.onImageError;
	MagicShowTypeC.midloadingobj.onerror=MagicShowTypeC.onImageError;
    MagicShowTypeC.Mode = MagicShowTypeC.ModeType.Normal;
	
    str = "";
    str += "<div class=\"pro_0302_main\">";
    str += "    <div class=\"pro_0302_left\" style=\"cursor:url(../images/ZoomIn.cur),url(../images/ZoomIn.cur),auto;\" id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.midshowid + "\">";
    str += "    	<div class=\"" + (MagicShow.bExpaired ? "pro_expaired_img" : "pro_expaired_noimg") + "\"></div>";
    str += "        <div class=\"big_btn\">";
    str += "            <div class=\"big_btn_img\"></div>";
    str += "            <div class=\"big_btn_text\"><b>Click for Large Image</b></div>";
    str += "            <div style=\"color:#278BE3; float:left;font-size:11px;height:23px; line-height:23px;text-align:center;text-decoration:underline;width:104px;\">";
	str += "				<a href=\""+ MoreImageURL +"\" style=\"color:#278BE3;\" target=\"_blank\"><b><span id=\"viewMoreImage\">View All Images</span></b></a>";
	str += "			</div>";
    str += "        </div>";
    str += "    </div>";
    str += "    <div class=\"pro_0302_right2\">";
    str += "        <div class=\"pro_0302_right\" id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.smallscrollid + "\">";
    str += "            <div id='btnpre' class=\"pro_0302_btn pro_0302_btn_prve\" onclick=\"MagicShowTypeC.ChangePage(-1)\"></div>";
    str += "            <div class=\"pro_0302_bg\">";
    str += "                <ul class=\"pro_0302_simg\">";
    for (var i=0; i < MagicShowTypeC.smallimgs; i++) {
        MagicShowTypeC.smallimgids.push(MagicShowTypeC.smallimgid + i);
        if (i < MagicShowTypeC.MagicShow.msSmallImg.length)
            str += "            <li class=\"pro_0302_simg_C\"><div id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.smallimgid + i + "\" onclick=\"MagicShowTypeC.ChangeImage(" + i + ")\" style=\"width: 56px; height: 56px; cursor: pointer;\" class=\"ddd\"><a href=\"javascript:void(0);\"><img id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.smallimgobjid + i + "\" src=\""+MagicShowTypeC.MagicShow.msSmallImg[i]+"\" style=\"border:0px;\"/></a></div></li>";
        else
            str += "            <li class=\"pro_0302_simg_C\" style=\"display: none;\"><div id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.smallimgid + i + "\" onclick=\"MagicShowTypeC.ChangeImage(" + i + ")\" style=\"width: 50px; height: 50px; cursor: pointer; background: center center no-repeat;\"><img id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.smallimgobjid + i + "\" /></div></li>";
    }
    str += "                </ul>";
    str += "            </div>";
    str += "            <div id='btnnext' class=\"pro_0302_btn pro_0302_btn_next\" onclick=\"MagicShowTypeC.ChangePage(1)\"></div>";
    str += "        </div>";
    str += "    </div>";
    str += "</div>";
    str += "<div class=\"autoaddheight\"></div>";
    /*str += "<div class=\"pro_0219_overlayer\" style=\"display: none;\" id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.overlayerid + "\"></div>";
    str += "<div class=\"pro_0219_container\" style=\"display: none;\" id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.containerid + "\">";
    str += "    <div class=\"photos\">";
    str += "        <div class=\"photos_img\"><a href=\"/\"></a></div>";
    str += "        <div class=\"photos_btn\">";
    str += "            <table width=\"325\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">";
    str += "                <tr>";
    str += "                    <td><a class=\"prev\" href=\"javascript:void(0);\" onclick=\"MagicShowTypeC.ChangeImageByStep(-1);\"></a></td>";
    str += "                    <td><a class=\"close\" href=\"javascript:void(0);\" onclick=\"MagicShowTypeC.gotoNormalMode();\"></a></td>";
    str += "                    <td align=\"left\"><a class=\"next\" href=\"javascript:void(0);\" onclick=\"MagicShowTypeC.ChangeImageByStep(1);\"></a></td>";
    str += "                </tr>";
    str += "            </table>";
    str += "        </div>";
    str += "        <div class=\"photos_img2\">";
    str += "            <div class=\"photos_close\">";
    str += "                <div class=\"photos_close_img2\"></div>";
    str += "                <div class=\"photos_close_btn\"><a href=\"javascript:void(0);\" onclick=\"MagicShowTypeC.gotoNormalMode();\"></a></div>";
    str += "                <div class=\"photos_close_img\"></div>";
    str += "            </div>";
    str += "            <div class=\"photos_home\"><a href=\"/\"></a></div>";
    str += "        </div>";
    str += "    </div>";
    str += "    <div class=\"photos_text\">(<span id=\"currimg\">" + String(MagicShowTypeC.currimg + 1) + "</span>/" + String(MagicShowTypeC.MagicShow.msSmallImg.length) + ")</div>";
    str += "</div>";*/
    str += "<div class=\"pro_0219_overlayer1\" style=\"display: none; cursor:url(../images/ZoomOut.cur),url(../images/ZoomOut.cur),auto;\" onclick=\"MagicShowTypeC.gotoNormalMode();\" id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.bigshowid + "\">";
    //str += "    <img id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.bigimgshowid + "\" style=\"width: 100%; height: 100%;\" />";
    str += "    <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	str += "        <tr>";
	str += "            <td><img src=\"/images/MagicShow/img_0512_01.gif\" width=\"14\" height=\"16\" /></td>";
	str += "            <td background=\"/images/MagicShow/img_0512_02.gif\" style=\"background-repeat:repeat-x;\"></td>";
	str += "            <td><img src=\"/images/MagicShow/img_0512_03.gif\" width=\"17\" height=\"16\" /></td>";
	str += "        </tr>";
	str += "        <tr>";
	str += "            <td background=\"/images/MagicShow/img_0512_04.gif\" style=\"background-repeat:repeat-y;\"></td>";
	str += "            <td align='center' valign='middle'>";
	str += "                <div style=\"display: none; background: center center;\" id=\"" + MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.containerid + "\"></div>";
	str += "            </td>";
	str += "            <td background=\"/images/MagicShow/img_0512_05.gif\" style=\"background-repeat:repeat-y;\"></td>";
	str += "        </tr>";
	str += "        <tr>";
	str += "            <td><img src=\"/images/MagicShow/img_0512_06.gif\" width=\"14\" height=\"16\" /></td>";
	str += "            <td background=\"/images/MagicShow/img_0512_07.gif\" style=\"background-repeat:repeat-x;\"></td>";
	str += "            <td><img src=\"/images/MagicShow/img_0512_08.gif\" width=\"17\" height=\"16\" /></td>";
	str += "        </tr>";
	str += "    </table>";
    str += "</div>";

    MagicShowTypeC.MagicShow.msObj.innerHTML = str;
	
    MagicShowTypeC.midshowobj = document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.midshowid);
    MagicShowTypeC.bigshowobj = document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.bigshowid);
    //MagicShowTypeC.bigimgshowobj = document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.bigimgshowid);
    //MagicShowTypeC.bigimgshowobj.style.display = 'none';
	
    //MagicShowTypeC.overlayerobj = document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.overlayerid);
    MagicShowTypeC.containerobj = document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.containerid);
    for (var i=0; i < MagicShowTypeC.smallimgs; i++) {
         MagicShowTypeC.smallimgobjs.push(document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.smallimgids[i]));
		 var obj1 = document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.smallimgobjid + i);
        //obj1.onerror = function(){ MagicShowTypeA.ImageOnError(obj, obj1); };
		obj1.onerror=MagicShowTypeC.onImageError;
        MagicShowTypeC.smallimgloadobjs.push(obj1);
    }

    MagicShow.addEvent(document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.smallscrollid), 'mousewheel', MagicShowTypeC.onMouseScroll);
    MagicShow.addEvent(document.getElementById(MagicShowTypeC.MagicShow.msObj.id + "_" + MagicShowTypeC.smallscrollid), 'DOMMouseScroll', MagicShowTypeC.onMouseScroll);
    //MagicShow.addEvent(MagicShowTypeC.bigshowobj, 'mousewheel', MagicShowTypeC.onMouseScroll);
    //MagicShow.addEvent(MagicShowTypeC.bigshowobj, 'DOMMouseScroll', MagicShowTypeC.onMouseScroll);

    MagicShowTypeC.ChangePage(0);
	MagicShowTypeC.ChangeImage(0);
    MagicShowTypeC.init0();
};

MagicShowTypeC.uninit = function(obj){
    MagicShowTypeC.Mode = MagicShowTypeC.ModeType.Normal;

    MagicShowTypeC.bigloadingobj.onload = function(){};
    MagicShowTypeC.midloadingobj.onload = function(){};
    MagicShowTypeC.bigloadingobj = null;
    MagicShowTypeC.midloadingobj = null;

    MagicShowTypeC.bBigLoaded = false;
    MagicShowTypeC.bMidLoaded = false;

    MagicShowTypeC.midimgobj = null;
    //MagicShowTypeC.overlayerobj = null;
    MagicShowTypeC.containerobj = null;

    for (var i=0; i < MagicShowTypeC.smallimgs; i++) {
         MagicShowTypeC.smallimgids.pop();
         MagicShowTypeC.smallimgobjs.pop();
    }

    MagicShowTypeC.MagicShow = null;
    MagicShowTypeC.smallpage = 0;
    MagicShowTypeC.smallpages = 0;
    MagicShowTypeC.currimg = -1;

    str = "";
    str += "MagicShowType: " + MagicShowTypeC.info.name + "<br />";
    str += "version: " + MagicShowTypeC.info.version + "<br />";
    str += "date: " + MagicShowTypeC.info.date + "<br />";
    str += "author: " + MagicShowTypeC.info.author + "<br />";
    return str;
};

MagicShowTypeC.register = function() {

    var found = false;
    for (var i=0; i < MagicShow.ShowType.length; i++) {
        if (MagicShow.ShowType[i].name == MagicShowTypeC.info.name) {
            found = true;
            break;
        }
    }
    if(!found) MagicShow.ShowType.push({name : MagicShowTypeC.info.name, type : MagicShowTypeC});
};

