if(parseInt(zno) <= 17 || parseInt(zno) >=32)
/* 區18-31不顯示浮水印廣告 */
{
document.getElementById('watermarkLink').href = $("ads_link:eq(0)", xmldoc).text();
document.getElementById('watermarkImgurl').src = $("ads_imgurl:eq(0)", xmldoc).text();
document.getElementById('objLayerRightMenu').style.display="block";
}
}
}
}
});
});
function scrollLayer(p_obj_name, p_gap_wpoint,p_gap_hpoint)
{
var start_point, end_point;
var obj_layer = document.getElementById(p_obj_name);
obj_layer.style.left=p_gap_wpoint;
start_point = parseInt(obj_layer.style.top, 10);
if ( start_point < p_gap_hpoint ) start_point = p_gap_hpoint;
end_point = document.body.scrollTop + p_gap_hpoint;
limit_point = parseInt(window.document.body.scrollHeight) - parseInt(obj_layer.offsetHeight) -10;
if ( end_point > limit_point ) end_point = limit_point;
if ( start_point != end_point )
{
scroll_amount = Math.ceil( Math.abs( end_point - start_point ) / 15 );
obj_layer.style.top = parseInt(start_point, 10) + ( ( end_point < start_point ) ? -scroll_amount : scroll_amount );
}
timer = window.setTimeout ("scrollLayer('" + p_obj_name + "', " + p_gap_wpoint + "," + p_gap_hpoint+ ");", 1);
}
var adjWidth=Math.ceil(window.document.body.clientWidth * (0.94)); /* 顯示的寬比例, 數字愈大愈靠近視窗右邊 */
var ajdHeight=Math.ceil(window.document.body.clientHeight*(0.08)); /* 顯示的高比例, 數字愈大愈靠近視窗下面 */
var obj_layer = document.getElementById("objLayerRightMenu");
obj_layer.style.top =adjWidth;
obj_layer.style.left=ajdHeight;
scrollLayer("objLayerRightMenu", adjWidth,ajdHeight);
var timer;
var timer2;
var timer2=window.setTimeout("resizeMe("+adjWidth+","+ajdHeight+");",500);
function resizeMe(beforeWidth,beforeHeight) {
var afterWidth=Math.ceil(window.document.body.clientWidth * (0.94)); /* 顯示的寬比例, 數字愈大愈靠近視窗右邊 */
var afterHeight=Math.ceil(window.document.body.clientHeight*(0.08)); /* 顯示的高比例, 數字愈大愈靠近視窗下面 */
if( (beforeWidth !=afterWidth) && (beforeHeight !=afterHeight) ){ /* 有改變視窗大小 */
window.clearTimeout(timer);
window.clearTimeout(timer2);
scrollLayer("objLayerRightMenu", afterWidth,afterHeight);
adjWidth=afterWidth;
ajdHeight=afterHeight;
timer2=window.setTimeout("resizeMe("+adjWidth+","+ajdHeight+");",500);
}
else{
timer2=window.setTimeout("resizeMe("+adjWidth+","+ajdHeight+");",500);
}
}
}
}
/* WaterMark end */