document.write("
"); var pic = new Array(); var link = new Array(); pic[0] = 'http://img2.house365.com/njads/2013/07/19/137422189551e8f6478c0a0.jpg'; link[0] = 'http://www.house365.com/adclick.php?id=20447'; pic[1] = 'http://img8.house365.com/njads/2013/07/19/137421430251e8d89ec6e50.jpg'; link[1] = 'http://www.house365.com/adclick.php?id=20431'; pic[2] = 'http://img2.house365.com/njads/2013/07/19/137422435151e8ffdfb8992.jpg'; link[2] = 'http://www.house365.com/adclick.php?id=20455'; var number = pic.length; var index = Math.floor(Math.random()*number); var tmp_pic = [], tmp_link = []; for(var i=index; i < number; i++){ tmp_pic.push(pic[i]); tmp_link.push(link[i]); } for(i=0; i < index; i++){ tmp_pic.push(pic[i]); tmp_link.push(link[i]); } var url = "images="+tmp_pic.join("*")+"&url="+tmp_link.join("*"); document.write("
");