function check_frame_page(querystr){ regexp_frame = /^(\/)?frame\.neo/; if(querystr!=""){ if(!regexp_frame.test(top.location.pathname)) top.location.href = "/frame.neo?startat="+querystr; } else { regexp_index = /^(\/)?index\.neo/; if((regexp_frame.test(top.location.pathname))&&(regexp_index.test(window.location.pathname))) top.location.href = window.location; } }