



/**********************************************************************************
 * GLOBAL CONSTANTS: This file defines constants that are available on the client *
 * as well as on the server side.                                                 *
 **********************************************************************************/

// contsant defining strings that are undefined
var notset = "__notset__";

// number of news shown on startpage
var num_latest_news = "12";

// number of news shown in ticker
var num_ticker_news = "4";

// settings for query cache [min]
var ttl_global_query_cache = 1000 * 60 * 360;

// com settings (int)
var com_min_refresh = 5000;
var com_max_refresh = 20000;
var com_min_idle_put = 3000;

// location of images used in show HTML on server (trailing "/")
var icon_location = "/images_app/";

// image pathes for guestwin and rendering
var image_path = "http://cropfm.at/images/";
var guest_image_path = "http://cropfm.at/resources/guestdata/";

// set media pathes from server setting
var mp3_dl_path = "mp3/";
var real_dl_path = "ra/";
var video_dl_path = "video/";

// set online directories for media files (download pathes defined configuration.properties)
var real_audio_path = "http://cropfm.at/ra/";
var mp3_audio_path = "http://cropfm.at/mp3/";
var chat_path = "http://cropfm.at/chat/";
var video_path = "http://cropfm.at/video/";

// the standart buttom images
var button_top = "standard_button_top.gif";
var button_top_inactive = "standard_button_top_inactive.gif";
var button_right = "standard_button_right.gif";
var button_right_inactive = "standard_button_right_inactive.gif";
var button_bottom = "standard_button_bottom.gif";
var button_bottom_inactive = "standard_button_bottom_inactive.gif";
var button_left = "standard_button_left.gif";
var button_left_inactive = "standard_button_left_inactive.gif";

// icon images
var spenden_icon = "simple_icon_spenden.gif";
var spenden_icon_active = "simple_icon_spenden_active.gif";
var news_icon = "simple_icon_news.gif";
var news_icon_active = "simple_icon_news_active.gif";
var chat_icon = "simple_icon_chat.gif";
var chat_icon_active = "simple_icon_chat_active.gif";
var ogg_icon = "simple_icon_ogg_listen.gif";
var ogg_icon_active = "simple_icon_ogg_listen_active.gif";

var mp3_dl = "simple_icon_mp3_download.gif";
var mp3_dl_active = "simple_icon_mp3_download_active.gif";
var mp3_ol = "simple_icon_mp3_listen.gif";
var mp3_ol_active = "simple_icon_mp3_listen_active.gif";

var real_dl = "simple_icon_real_download.gif";
var real_dl_active = "simple_icon_real_download_active.gif";
var real_ol = "simple_icon_real_listen.gif";
var real_ol_active = "simple_icon_real_listen_active.gif";

var video_dl = "simple_icon_video.gif";
var video_dl_active = "simple_icon_video_active.gif";

// show link icon 
var show_link_bullet = "icon_bullet_point.gif";

// bullet point for inline links
var link_bullet = "&gt;&gt;&nbsp;";
var link_bullet_inactive = "&gt;&gt;&nbsp;";

// more icon
var more_icon_images = [ "icon_more.gif", 
                         "icon_more_active.gif", 
                         "icon_more_inactive.gif" ];

// less icon
var less_icon_images = [ "icon_less.gif", 
                         "icon_less_active.gif", 
                         "icon_less_inactive.gif" ];

// rss icon big
var rss_icon_large_images = [ "rss_feed_large.gif", 
                              "rss_feed_large_over.gif" ];

// rss icon small
var rss_icon_small_images = [ "rss_feed_small.gif", 
                              "rss_feed_small_over.gif" ];

// CROPfm logo small
var cropfm_logo_sml = [ "cropfm_logo_naked_egg.gif", 
                        "cropfm_logo_naked_egg_over.gif" ];

// ****************** URL's ******************

// must be set to "cropfm" hardcoded because of crop.mur.at/cropfm problem!
var host_name = top.location.protocol + "//" + top.location.host;
//var host_name ="http://cropfm.mur.at";

// prefix for URL's (host_name derived client side)
var host_dir = host_name + "/";

// the home directory on the server
var home_dir = "/";

// download servlet name
var dl_servlet = host_dir + "cropfm/services/download";

// download servlet name
var listen_servlet = host_dir + "cropfm/services/listen";

// download servlet name
var rss_servlet = host_dir + "cropfm/services/cropfmrssservlet";

// the style sheet being used throughout the app
var css_location = host_dir + "css/ui.css";

// URL to listen on-line
var listenlive_url = "/cropfm/jsp/listenlive.jsp";

// URL to CROPcom
var cropcom_url = "http://cropfm.at/cropfm/jsp/cropcom.jsp";

// URL to newsletter subscription
var newsletter_url = "http://lists.mur.at/mailman/listinfo/cropfm-newsletter";

// CROPfm index page
var cropfm_home_url = "/cropfm/jsp/index.jsp";

// news archive
var news_archive_url = "/cropfm/jsp/getnewsarchive.jsp";

//direct show links in past shows
var show_link_url = "http://cropfm.at/past_shows.htm?showid=";


// *************** Text Resources ***************

// *** icon titles ***
var title_size = " Dateigröße: ";
var title_mp3_dl = "Sendung als mp3 herunterladen" + title_size;
var title_mp3_ol = "Sendung als mp3 on-line hören...";
var title_real_dl = "Sendung als real audio herunterladen." + title_size;
var title_real_ol = "Sendung als real audio on-line hören...";
var title_video_dl = "Video Datei herunterladen." + title_size;

// *** cropfm showtype labels ***
var cropfm_label = '<b style="color:#0000FF">CROP</b><i style="color: #CCCCFF">fm</i>';

var cropfm_special_ge = cropfm_label + '&nbsp;<span class="showType">spezial</span>';
var cropfm_special_english_ge = cropfm_label + '&nbsp;<span class="showType">spezial [english]</span>';

var cropfm_netradio_ge = cropfm_label + '&nbsp;<span class="showType">Open End</span>';
var cropfm_netradio_english_ge = cropfm_label + '&nbsp;<span class="showType">Open End [english]</span>';

var cropfm_english_ge = '<span class="showType">Interview in English</span>';

//  *************** Labels ***************
var more_label_de = "mehr";
var more_title_de = "Gesamte Sendungbeschreibung anzeigen";

var guest_heading_singular_ge = "Sendungsgast:";
var guest_heading_plural_ge = "Sendungsgäste:";

var subject_heading_singular_ge = "Themengebiet:";
var subject_heading_plural_ge = "Themengebiete:";

var mod_heading_singular_ge = "Moderator:";
var mod_heading_plural_ge = "Moderatoren:";

var guest_website_label_ge = "website";
var guest_email_label_ge = "email";
var guest_info_label_ge = "Gast-Info";

// *************** HTML Resources ***************
var CropfmElements = {};
// html for e.g. header bar of pop up windows
CropfmElements["WINDOW_HEADING_HTML"] = "<table border='0' width='100%' cellspacing='0' cellpadding='0' style='background-image:url(/images_app/main_categories_header_tesla_center_loop.gif); background-position:15px 0px'><tr><td height='48' width='15' valign='middle' align='center' style='background-color:#00003f'><img height='48' width='15' src='/images_app/main_categories_header_tesla_left.gif'></td><td width='100%' height='48' valign='top' align='left' class='section_heading' style='padding:15px 0px 0px 0px'><nobr>($heading)</nobr></td><td height='48'><img height='48' width='32' src='/images_app/popup_header_tesla_wrapper.gif'></td></tr></table>";

// html for windwo frame
CropfmElements["INNER_FRAME_BEGIN_HTML"] = "<table cellspacing='0' cellpadding='0' border='0' width='100%' height='100%'><tr><td><img src='/images_app/tesla_thick_frame_corner_1.gif' width='12' height='12' border='0'></td><td><img id='frame_top' src='/images_app/tesla_thick_frame_3.gif' height='12'></td><td><img src='/images_app/tesla_thick_frame_corner_2.gif' width='12' height='12' border='0'></td></tr><tr><td><img id='frame_left' src='/images_app/tesla_thick_frame_2.gif' width='12'></td><td><div id='frameContent' class='popupBody' style='overflow:auto'>";
CropfmElements["INNER_FRAME_END_HTML"] = "</div></td><td><img id='frame_right' src='/images_app/tesla_thick_frame_4.gif' width='12'></td></tr><tr><td><img src='/images_app/tesla_thick_frame_corner_4.gif' width='12' height='12' border='0'></td><td><img id='frame_bottom' src='/images_app/tesla_thick_frame_1.gif' height='12'></td><td><img src='/images_app/tesla_thick_frame_corner_3.gif' width='12' height='12' border='0'></td></tr></table>";

// *************** RegExps for CROPfm tags ***************

var regexp_inline_link = new RegExp("\\[%%([^%]+)%%([^%]+)%%\\]");
// exp for [%%label%%file%%size%%]
var regexp_audio_video_show_link = new RegExp("\\[%%([^%]+)%%([^%]+)%%([^%]+)%%\\]|\\[%%([^%]+)%%([^%]+)%%\\]");
