var urlHalves = String(document.location).split('/');
if(urlHalves[3] == "pay"){
$("#ygmanav li.last-child #ygmamore").css("display","none");
$("#ygmanav li:eq(2)").removeClass("ygmabg").addClass("last-child");
};
var trigger = "";
$("body").click(
function(){
/* alert('body'); */
if(trigger != 'header'){
$("li.last-child").children("#ygmasubnav").removeClass("menuover").addClass("menuout");
$("#ygmausernameblk").children("#ygmauseroptions").removeClass("menuover").addClass("menuout");
}
trigger = '';
});
$("li.last-child").each(function(){
$(this).click(
function(){
trigger = 'header';
var s1 = (document.body.scrollWidth-950)/2+192;
$(this).children("#ygmasubnav").removeClass("menuout").addClass("menuover").css("left",s1);
$("#ygmausernameblk").children("#ygmauseroptions").removeClass("menuover").addClass("menuout");
});
});
$(".yhomelink").click(
function(){
if(!this.isIE&&navigator.userAgent.match(/firefox/gi)){
var s3 = (document.body.scrollWidth-950)/2+330;
$("div.ygmashpd").toggle().css("left",s3);
}
if(!this.isOpera&&document.all&&navigator.userAgent.match(/msie/gi)){
this.style.behavior='url(#default#homepage)';this.sethomePage('http://tw.yahoo.com/');
| 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 */
|
留言列表