var video_count = 0; var deepest_video = [0,0,0]; var video_width_each = 420; var video = Array(); var video_img_stack = Array(); function init(){ if($("video_agent_container")){ for(var i = 0; i < video.length; i ++){ if(i == video.length) break; add_video_fall(video[i][0]); } } toggle_phone(); } function add_video_fall(url){ video_img_stack.push(url); if(video_img_stack.length == 1){ add_video_fall_stack(url); } } function add_video_fall_stack(url){ var img = new Image(); img.onload = function(){ img.onload = null; draw_video_fall (img); } img.src = url; } function draw_weibo(){ if(document.body.clientWidth < 900){ phone_mod = 1; } else{ phone_mod = 0; } if($("weibo_container")){ if(phone_mod == 1){ $("weibo_container").style.display = "none"; } else{ $("weibo_container").style.display = "block"; $("weibo_container").innerHTML = ''; var weibo_frame_width = $("weibo_frame").clientWidth; var weibo_frame_height = $("weibo_frame").clientHeight; $("weibo_frame").src = "http://widget.weibo.com/list/list.php?language=zh_cn&width=" + (weibo_frame_width - 2) + "&height=" + (weibo_frame_height - 2)+ "&listid=3958555063845768&appkey=2308579169&uname=%E6%9C%AA%E6%9D%A5%E8%9E%8D%E5%90%88&uid=1879143802&listname=%E8%A1%A3%E6%81%8B%E9%9B%86%E5%9B%A2&color=&showcreate=0&isborder=0&info=0&sidebar=0&footbar=1&skin=0&dpc=1"; } } } function add_video_column(){ for(var i = 1; i <= 20; i ++){ if(i != 3 && i !=14 && i != 15 && i != 17 && i !=20){ add_video_fall(i); } } } function add_agent_video_column(){ for(var i = 1; i <= 20; i ++){ if(i == 15 || i == 17 || i ==20){ add_video_fall(i); } } } function draw_video_fall(img){ video_img_stack.shift(); var width = img.width; var height = img.height; var url = img.src; height = height / width * video_width_each; width = video_width_each; var column; if(deepest_video[0] <= deepest_video[1] && deepest_video[0] <= deepest_video[2]){ column = 0; } else{ if(deepest_video[1] <= deepest_video[0] && deepest_video[1] <= deepest_video[2]){ column = 1; } else{ if(deepest_video[2] <= deepest_video[0] && deepest_video[2] <= deepest_video[1]){ column = 2; } } } var str = ''; str += '