";
for( i = jpg_star ; i <= jpg_end ; i++ ){
if(i < Large_cgurl.length){
if(widthtemp==799) showtemp = showtemp + "![]()
";else showtemp = showtemp + "![]()
";
if(i==jpg_end){
//幻燈片緩衝
if(i >=20){
showtemp = showtemp + "
";
showtemp = showtemp + "
";
showtemp = showtemp + "
";
showtemp = showtemp + "
";
}
showtemp = showtemp + "下一頁預覽圖(緩衝)
";
showtemp = showtemp + "
";
showtemp = showtemp + "
";
showtemp = showtemp + "
";
showtemp = showtemp + "
";
showtemp = showtemp + "
";
showtemp = showtemp + "
";
showtemp = showtemp + "
";
showtemp = showtemp + "![]()
";
}
}
}
showtemp = showtemp + "";
document.getElementById('show_cg_html').innerHTML = showpage + showtemp; count();
if(pagetop_x=='ph_prev_or_ph_next'){
}else{
//到上面TOP
CG_top_f();
}
}
show_input(1);
/*
function reurl(){
url = location.href;
var times = url.split("?");
if(times[1] != 1){
url += "?1";
self.location.replace(url);
}
}
*/
//幻燈片 模組
(function($) {
$.fn.touchwipe = function(settings) {
var config = {
min_move_x: 20,
min_move_y: 20,
wipeLeft: function() { },
wipeRight: function() { },
wipeUp: function() { },
wipeDown: function() { },
preventDefaultEvents: true
};
if (settings) $.extend(config, settings);
this.each(function() {
var startX;
var startY;
var isMoving = false;
function cancelTouch() {
this.removeEventListener('touchmove', onTouchMove);
startX = null;
isMoving = false;
}
function onTouchMove(e) {
if(config.preventDefaultEvents) {
e.preventDefault();
}
if(isMoving) {
var x = e.touches[0].pageX;
var y = e.touches[0].pageY;
var dx = startX - x;
var dy = startY - y;
if(Math.abs(dx) >= config.min_move_x) {
cancelTouch();
if(dx > 0) {
config.wipeLeft();
}
else {
config.wipeRight();
}
}
else if(Math.abs(dy) >= config.min_move_y) {
cancelTouch();
if(dy > 0) {
config.wipeDown();
}
else {
config.wipeUp();
}
}
}
}
function onTouchStart(e) {
if (e.touches.length == 1) {
startX = e.touches[0].pageX;
startY = e.touches[0].pageY;
isMoving = true;
this.addEventListener('touchmove', onTouchMove, false);
}
}
if ('ontouchstart' in document.documentElement) {
this.addEventListener('touchstart', onTouchStart, false);
}
});
return this;
};
})(jQuery);
$(function(){
$("#imagegallery").touchwipe({
wipeLeft: function() {picture_carousel('prev');},
wipeRight: function() {picture_carousel('next');},
wipeUp: function() {PictureWidth_AddSub('sub');},//圖片縮小
wipeDown: function() {PictureWidth_AddSub('add');},//圖片放大
min_move_x: 20,
min_move_y: 20,
preventDefaultEvents: true
});
document.getElementById("ph_prev").onclick = function(){picture_carousel('prev');}
document.getElementById("ph_next").onclick = function(){picture_carousel('next');}
document.getElementById("imagegallery").onclick = function(){picture_carousel("next");} //載入 幻燈片 頁數狀態
re_PageNum();
//載入 幻燈片 第一張圖片
picture_carousel('prev');
pof_x=0;
if(location.hostname=='cg.mm-cg.com') pof_x++;
document.getElementById("phCG_OnOff").onclick = function(){
pof_x++;
if(pof_x%2==0){
document.getElementById('phCG_OnOff').innerHTML='