function resizeHeight(ID){try{$('#FRAME_'+ID,parent.document).height($('#page').height()+36);}catch(e){};};$(window).load(function(){try{var ID=0;var pageURL=String(location.pathname).substr(1).replace(/\/$/,"").replace(/\//g,"-")+String(location.search).replace(/\?/g,"_");var hashURL=String(parent.location.hash).substr(1);if(/\[(\d+)\]/i.test(hashURL))ID=hashURL.match(/\[(\d+)\]/)[1];parent.tabArray.splice(ID,1,pageURL);parent.location.hash=pageURL+"["+ID+"]";resizeHeight(ID);$('#loading',parent.document).css('display','none');$('html',parent.document).animate({scrollTop:0},600);$('a[rel="index"]').click(function(){$('#loading',parent.document).css('display','block');});}catch(e){$('#page').width(760);$('#page_top').html('<a href="/"><img src="/images/frame_logo.gif"/></a>');$('#page_bottom').html('Copyright 2004-2009 RainBlog. All Rights Reserved. <a href="http://rainspace.net/" target="_blank">烟雨空间</a> 版权所有<br /><a href="http://rain520.net/" target="_blank"><img src="/logo/RainPowered.gif" alt="RainBlog2.0"/></a>');};$('.view').toggle(function(){var id=$(this).removeClass().addClass('close').closest('tr').attr("id").substr(3);$('.content').children('div[id^="DIV_"]').css('display','block');if($('#viewContent').length)$('#viewContent').remove();$('#DIV_'+id).css('display','none').closest('td').append('<div id="viewContent"><center><img src="/images/loader.gif"/></center></div>');$('#viewContent').load('/getdata/getcontent/?id='+id,null,function(){resizeHeight(ID);});},function(){var id=$(this).removeClass().addClass('view').closest('tr').attr("id").substr(3);$('#DIV_'+id).css('display','block').nextAll('#viewContent').slideUp(0,function(){resizeHeight(ID);});});$('.title').toggle(function(){$(this).children('input').removeClass().addClass('hide');$('#DIV_'+$(this).closest('tr').attr("id").substr(3)).slideUp(400,function(){resizeHeight(ID);});},function(){$(this).children('input').removeClass().addClass('show');$('#DIV_'+$(this).closest('tr').attr("id").substr(3)).slideDown(400,function(){resizeHeight(ID);});});});function regrep(content){content=String(content);content=content.replace(/\x26/g,"&amp;");content=content.replace(/\x20/g,"&nbsp;");content=content.replace(/\x22/g,"&quot;");content=content.replace(/\x27/g,"&#39;");content=content.replace(/\x3c/g,"&lt;");content=content.replace(/\x3e/g,"&gt;");content=content.replace(/\x0d\x0a|\x0d|\x0a/g,"<br />");return content;};