function goTop(){    new Effect.ScrollTo('BodyFrame', {        offset: 0,        duration: 0.5    });}function TestAJAX(){    var msgbox = 'WebSiteMask';    var actionurl = siteurl + '/ajax.php?p=test_ajax';    var QString = '&value=12';    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'post',        postBody: QString,        onComplete: function(){            new Effect.Appear(msgbox, {                duration: 0.5            });        },        asynchronous: true,        evalScripts: true    });};function ReloadPoster(){    var msgbox = 'PosterBox';    var actionurl = siteurl + '/ajax.php?p=reload_poster';    var QString = '&sn=1';    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'post',        postBody: QString,        onComplete: function(){            new Effect.Appear(msgbox, {duration: 1.5, from:0,to:1});			new Effect.Appear(msgbox, {delay:8.5, duration: 1.5, from:1,to:0});        },        asynchronous: true,        evalScripts: true    });};function start_ReloadPoster(){    var task = new PeriodicalExecuter(ReloadPoster, 10);};function SubMenu(menu){    var msgbox = 'SubMenu';    var actionurl = siteurl + '/ajax.php?p=show_submenu';    var QString = '&menu=' + menu;    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'post',        postBody: QString,        onComplete: function(){            new Effect.Appear(msgbox, {                duration: 1,                from: 0,                to: 1            });        },        asynchronous: true,        evalScripts: true    });};function switchATypePhoto(sn){    var msgbox = 'ATypeMainPhoto';    var actionurl = siteurl + '/ajax.php?p=show_photo';    var QString = "&PSN=" + sn;    $(msgbox).innerHTML = '<div style=text-align:center><img src=files/img/common/ajax/loading3.gif align=middle style=vertical-align:middle> loading now ...</div>';    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'post',        postBody: QString,        onComplete: function(){            new Effect.Appear(msgbox, {                duration: 1,                from: 0,                to: 1            });        },        asynchronous: true,        evalScripts: true    });    new Effect.ScrollTo('ATypePhotoList', {        duration: 0.2,        offset: 0    });}function HotNewsBox_ActPhoto(){    var msgbox = 'HotNewsBox';    var actionurl = siteurl + '/ajax.php?p=show_actphoto_list';    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'get',        onComplete: function(){            new Effect.Appear(msgbox, {                duration: 1,                from: 0,                to: 1            });        },        asynchronous: true,        evalScripts: true    });};function HotNewsBox_Video(){    var msgbox = 'HotNewsBox';    var actionurl = siteurl + '/ajax.php?p=show_video_list';    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'get',        onComplete: function(){            new Effect.Appear(msgbox, {                duration: 1,                from: 0,                to: 1            });        },        asynchronous: true,        evalScripts: true    });};function ShowVideo(sn){    var msgbox = 'HotVideoBox';    var actionurl = siteurl + '/ajax.php?p=show_video';    var QString = '&sn=' + sn;    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'post',        postBody: QString,        onComplete: function(){            new Effect.Appear(msgbox, {                duration: 1,                from: 0,                to: 1            });        },        asynchronous: true,        evalScripts: true    });};function HotNewsBox_GBK(){    var msgbox = 'HotNewsBox';    var actionurl = siteurl + '/ajax.php?p=show_gbk_form';    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'get',        onComplete: function(){            new Effect.Appear(msgbox, {                duration: 1,                from: 0,                to: 1            });        },        asynchronous: true,        evalScripts: true    });    goTo(msgbox);};function HotNewsBox_BA(){    var msgbox = 'HotNewsBox';    var actionurl = siteurl + '/ajax.php?p=show_ba_form';	$(msgbox).innerHTML = '載入中請稍後...';    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'get',        onComplete: function(){            new Effect.Appear(msgbox, {                duration: 1,                from: 0,                to: 1            });        },        asynchronous: true,        evalScripts: true    });    goTo(msgbox);};function SendBA(){    var msgbox = 'AddStatus';    var actionurl = siteurl + '/ajax.php?p=send_ba';    var formbox = 'BActF';    if ($('Name').value.length == 0 || $('Name').value.length < 2) {        $('Name').focus();        $('Name').style.backgroundColor = '#ffcc00';        $('Name').style.border = '1px solid #f30';        goTo('Name');        return false;    }    else {        $('Name').style.backgroundColor = '';        $('Name').style.border = '';    }    if ($('Email').value.length == 0 || $('Email').value.length < 8) {        $('Email').focus();        $('Email').style.backgroundColor = '#ffcc00';        $('Email').style.border = '1px solid #f30';        goTo('Email');        return false;    }    else {        $('Email').style.backgroundColor = '';        $('Email').style.border = '';    }    if ($('WebSite').value.length == 0 || $('WebSite').value.length < 8) {        $('WebSite').focus();        $('WebSite').style.backgroundColor = '#ffcc00';        $('WebSite').style.border = '1px solid #f30';        goTo('WebSite');        return false;    }    else {        $('WebSite').style.backgroundColor = '';        $('WebSite').style.border = '';    }    new Effect.Appear(msgbox);    ajax = new Ajax.Updater(msgbox, actionurl, {        method: 'post',        parameters: Form.serialize(formbox),        onComplete: function(){            new Effect.Appear(msgbox);        },        asynchronous: true,        evalScripts: true    });};/*SwitchImgBg #################*/function SwitchImgBg(id,bgfile,position){	var Img = $(id);	Img.style.backgroundImage="url("+bgfile+")";	Img.style.backgroundRepeat="no-repeat";	Img.style.backgroundPosition=position;};//end func/*ShowNote ###################*/function ShowMPhotoBox(){		new Effect.Appear('MPhotoBox',{duration:1});	var isize = $('SMPhoto').width;	if(isize == 0)	{		var imgsize = 'auto';		//var imgsize = $('SMPhoto').getWidth()+'px';		//var imgsize = Element.getWidth('SMPhoto')+'px';	}else	{		var imgsize = isize + 'px';	}//end if	$('MPhotoBox').style.width = imgsize;	new Effect.Fade('LoadStatus');		//var isize2 = $('SMPhoto').width;		//alert(isize);};//end funcfunction chekClassNum(classname){	var num_of_class = $$(classname).length;	alert(num_of_class);};//end func
