//Function to navigate through pages of results function goSearchType( type ) { if ( type == "cgm") //1 = cgm { top.f_content.document.location = "ctv_content_advanced_search_cgm.php?mode=search"; } else if( type == "archive") { top.f_content.document.location = "ctv_content_advanced_search_archive.php?mode=search"; } else { top.f_content.document.location = "ctv_content_advanced_search.php?mode=search"; } } function goResult( d, search_or_alert ) { //set global var o = 0; //determine direction if( d == 1 ) { o = 0; } else if( d == 2 ) { o = top.f_content.results_offset - top.f_content.results_limit; } else if( d == 3 ) { o = top.f_content.results_offset + top.f_content.results_limit; } else if( d == 4 ) { o = top.f_content.results_num_of / 10; // currently 10 results per screen. need to pull this value from o = Math.floor( o ); o = o * 10; if( o == top.f_content.results_num_of ) { o = o - 10; } } else { o = 0; } //paginate if( search_or_alert == "alert" && !isNaN( o ) ) { top.f_content.document.location = "ctv_content_alert_hits.php?offset=" + o + "&days_ago=" + top.f_content.document.alert_hits.days_ago_original.value + "&start_time=" + top.f_content.document.alert_hits.start_time.value + "&end_time=" + top.f_content.document.alert_hits.end_time.value + "&alert_id=" + top.f_content.document.alert_hits.alert_id.value; } else if ( !isNaN( o ) ) { top.f_content.document.location = "ctv_content_advanced_search_do.php?scroll=1&offset=" + o; } //if NaN is returned, alert the user to be more patient else { alert ( "Please be patient while the results load before paginating." ); } } function setLabelToolbarTopSearchAlertHits() { // parent.f_toolbar_top_search.label_alert_name.innerHTML = parent.f_content.document.alert_hits.alert_name.value; parent.f_toolbar_top_search.document.getElementById('label_alert_name').innerHTML = parent.f_content.document.alert_hits.alert_name.value; }