var activereception_site = document.location.href;
activereception_site = (activereception_site.indexOf('?')!= -1)
? activereception_site.substring(0,activereception_site.indexOf('?'))
: activereception_site;
var activereception_tracking_allowed = 1;
//strat cookies
activereception_cookie_online_id = activereception_getCookie_online_id('aaaal4IL');
var activereception_has_ac = activereception_getCookie_has_ac('1');
function activereception_getCookie_has_ac(value)
{
if (activereception_Get_Cookie('active_reception_al_cpg') == "") {
activereception_createCookie('active_reception_al_cpg','1',0);
return value;
} else
return 1;
}
function activereception_getCookie_online_id(web_id)
{
if (web_id.toString() == activereception_Get_Cookie('activereception_cookie_web_id').toString())
return activereception_Get_Cookie('activereception_cookie_online_id');
else
return "";
}
function activereception_createCookie(name,value,days)
{
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
} else
var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function activereception_Get_Cookie(name)
{
var start = document.cookie.indexOf(name+"=");
var len = start + name.length + 1;
if ((!start) && (name != document.cookie.substring(0, name.length))) {
return "";
}
if ( start == -1 ) return "";
var end = document.cookie.indexOf(";", len);
if (end == -1) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
function activereception_eraseCookie(name)
{
activereception_createCookie(name,"",-1);
}
// end cookies
// start json script
JSONscriptRequest.scriptCounter = 1;
function JSONscriptRequest(fullUrl) {
// REST request path
this.fullUrl = fullUrl;
// Keep IE from caching requests
this.noCacheIE = '&noCacheIE=' + (new Date()).getTime();
// Get the DOM location to put the script tag
this.headLoc = document.getElementsByTagName("head").item(0);
// Generate a unique script tag id
this.scriptId = 'YJscriptId' + JSONscriptRequest.scriptCounter++;
}
// buildScriptTag method
JSONscriptRequest.prototype.buildScriptTag = function () {
// Create the script tag
this.scriptObj = document.createElement("script");
// Add script object attributes
this.scriptObj.setAttribute("type", "text/javascript");
this.scriptObj.setAttribute("src", this.fullUrl + this.noCacheIE);
this.scriptObj.setAttribute("id", this.scriptId);
}
// removeScriptTag method
JSONscriptRequest.prototype.removeScriptTag = function () {
// Destroy the script tag
this.headLoc.removeChild(this.scriptObj);
}
// addScriptTag method
JSONscriptRequest.prototype.addScriptTag = function () {
// Create the script tag
this.headLoc.appendChild(this.scriptObj);
}
// end json script
// start get remote data
var activereception_firstCall = 0;
var activereception_CallTimer;
var activereception_mTimer;
var activereception_online_id = "";
var activereception_has_achive_chat = "";
var activereception_remote_server_text = "";
var activereception_remote_server_image = "";
var activereception_remote_server_button = "";
activereception_poll_server_time = new Date();
var activereception_chat_id = "";
var activereception_closed_chat_id = "";
var activereception_overlap_objects = new Array();
var activereception_old_chat = "";
var activereception_sound_on = "";
var activereception_sound_path = "";
if ( typeof(activereception_icon_objects) == 'undefined' )
var activereception_icon_objects = new Array();
if ( typeof(activereception_links) == 'undefined' )
var activereception_links = new Array();
if ( typeof(activereception_curent_num_links) == 'undefined' )
var activereception_curent_num_links = 0;
function activereception_trim(str)
{
return str.replace(/^\s*|\s*$/g,"");
}
//Function for initializating the page.
function activereception_startTracking() {
activereception_getClientInfo();
if (activereception_browser.isOpera) {
if (activereception_mTimer) clearInterval(activereception_mTimer);
activereception_getClientInfo();
}
}
//Gets the current messages from the server
function activereception_getClientInfo()
{
for (i=0; i< activereception_icon_objects.length; i++)
{
var web_page = "http://track.activereception.com/?script=trackingData",
url;
url = web_page + "&web_id=aaaal4IL";
url += "&doc=" + activereception_URLEncode(document.location);
url += "&language_id=NL";
url += "&charset=" + (document.characterSet
? document.characterSet : document.charset
? document.charset : '');
if (activereception_online_id == "") {
url += "&title=" + activereception_URLEncode(document.title);
url += "&res=" + screen.width+"x"+screen.height;
url += "&ref=" + activereception_URLEncode(document.referrer);
url += "&cookie=" + activereception_cookie_online_id;
url += "&java=" + (navigator.javaEnabled() ? "1" : "");
url += "&flash=" + activereception_get_flashversion();
url += "&sc_width=" + document.body.clientWidth;
url += "&sc_height=" + document.body.clientHeight;
url += "&has_ac=" + activereception_has_ac;
} else {
url += "&image_id=" + activereception_icon_objects[i].id;
url += "&logo_on=" + activereception_icon_objects[i].logo_on;
url += "&logo_off=" + activereception_icon_objects[i].logo_off;
if (activereception_icon_objects[i].operator_id!='')
url +="&operator_id=" + activereception_icon_objects[i].operator_id;
if (activereception_icon_objects[i].department_id!='')
url +="&department_id=" + activereception_icon_objects[i].department_id;
url += "&online_id=" + activereception_online_id;
url += "&sc_width=" + document.body.clientWidth;
url += "&sc_height=" + document.body.clientHeight;
url += "&has_ac=" + activereception_has_ac;
}
activereception_request = url + '&callback=activereception_ws_results';
try {
activereception_aObj = new JSONscriptRequest(activereception_request);
activereception_aObj.buildScriptTag();
activereception_aObj.addScriptTag();
} catch(err) {
if (activereception_mTimer)
clearInterval(activereception_mTimer);
activereception_mTimer = setTimeout('activereception_getClientInfo();',5000);
return;
}
}
}
function activereception_ws_results(obj) {
try {
if (obj == null) {
if (activereception_mTimer)
clearInterval(activereception_mTimer);
//Refresh our chat in 2 seconds
activereception_mTimer = setTimeout('activereception_getClientInfo();',5000);
return;
}
if (window.document.body &&
document.getElementById("activereception_popwin") == null) {
activereception_makeDiv();
}
var activereception_results_array = obj.ResultSet.Result;
var activereception_auto_invite_chat_url = "";
var activereception_invite_chat_url = "";
var activereception_invited_chat_id = "";
var activereception_chat_skin_image = "";
var activereception_chat_skin_default_text;
var activereception_chat_image_width;
var activereception_chat_image_height;
var activereception_chat_skin_start_sx;
var activereception_chat_skin_start_sy;
var activereception_chat_skin_start_ex;
var activereception_chat_skin_start_ey;
var activereception_chat_skin_close_sx;
var activereception_chat_skin_close_sy;
var activereception_chat_skin_close_ex;
var activereception_chat_skin_close_ey;
var activereception_chat_skin_text_sx;
var activereception_chat_skin_text_sy;
var activereception_chat_skin_text_ex;
var activereception_chat_skin_text_ey;
var activereception_chat_skin_font_type;
var activereception_chat_skin_font_style;
var activereception_chat_skin_text_color;
var activereception_chat_skin_text_size;
var activereception_chat_skin_text_format;
var activereception_chat_skin_link_sx;
var activereception_chat_skin_link_sy;
var activereception_chat_skin_link_ex;
var activereception_chat_skin_link_ey;
var activereception_chat_skin_link_url;
var activereception_chat_skin_link_text;
var activereception_chat_skin_link_font_type;
var activereception_chat_skin_link_font_style;
var activereception_chat_skin_link_text_color;
var activereception_chat_skin_link_text_size;
var activereception_chat_skin_link_text_format;
var activereception_chat_skin_link_back_color;
var activereception_chat_skin_position_top;
var activereception_chat_skin_position_left;
var activereception_chat_skin_tarea;
var activereception_chat_skin_tarea_sx;
var activereception_chat_skin_tarea_sy;
var activereception_chat_skin_tarea_ex;
var activereception_chat_skin_tarea_ey;
var activereception_chat_skin_tarea_ftype;
var activereception_chat_skin_tarea_fstyle;
var activereception_chat_skin_tarea_tcolor;
var activereception_chat_skin_tarea_tsize;
var activereception_chat_skin_tarea_bcolor;
var image_id;
var activereception_chat_window_language;
var tarea_msg = '';
var activereception_surveys_obj;
if (activereception_results_array.length > 0)
{
for (i=0;i< activereception_results_array.length;i++)
{
item_name = activereception_results_array[i].item;
item_value = activereception_results_array[i].value;
if (item_name == "chat_window_language")
activereception_chat_window_language = item_value;
if (item_name == "default_text")
activereception_chat_skin_default_text = item_value;
if (item_name == "skin")
activereception_chat_skin_image = item_value;
if (item_name == "skin_width")
activereception_chat_image_width = item_value;
if (item_name == "skin_height")
activereception_chat_image_height = item_value;
if (item_name == "start_sx")
activereception_chat_skin_start_sx = item_value;
if (item_name == "start_sy")
activereception_chat_skin_start_sy = item_value;
if (item_name == "start_ex")
activereception_chat_skin_start_ex = item_value;
if (item_name == "start_ey")
activereception_chat_skin_start_ey = item_value;
if (item_name == "close_sx")
activereception_chat_skin_close_sx = item_value;
if (item_name == "close_sy")
activereception_chat_skin_close_sy = item_value;
if (item_name == "close_ex")
activereception_chat_skin_close_ex = item_value;
if (item_name == "close_ey")
activereception_chat_skin_close_ey = item_value;
if (item_name == "text_sx")
activereception_chat_skin_text_sx = item_value;
if (item_name == "text_sy")
activereception_chat_skin_text_sy = item_value;
if (item_name == "text_ex")
activereception_chat_skin_text_ex = item_value;
if (item_name == "text_ey")
activereception_chat_skin_text_ey = item_value;
if (item_name == "font_type")
activereception_chat_skin_font_type = item_value;
if (item_name == "font_style")
activereception_chat_skin_font_style = item_value;
if (item_name == "text_color")
activereception_chat_skin_text_color = item_value;
if (item_name == "text_size")
activereception_chat_skin_text_size = item_value;
if (item_name == "text_format")
activereception_chat_skin_text_format = item_value;
if (item_name == "text")
activereception_remote_server_text = item_value;
if (item_name == "image")
activereception_remote_server_image = item_value;
if (item_name == "button")
activereception_remote_server_button = item_value;
if (item_name == "invited_chat_id") {
activereception_invited_chat_id = item_value;
activereception_chat_id = activereception_invited_chat_id;
}
if (item_name == "online_id") {
activereception_online_id = activereception_trim(item_value);
if (activereception_online_id != "") {
activereception_createCookie('activereception_cookie_web_id','aaaal4IL',30); // 30 days
activereception_createCookie('activereception_cookie_online_id',activereception_online_id,30);
}
}
if (item_name == "image_id")
image_id = item_value;
if (item_name == "change_image")
activereception_change_photo(activereception_trim(item_value), image_id);
if (item_name == "invite") {
activereception_tmp_client_id = activereception_trim(item_value);
if (activereception_tmp_client_id != "") {
activereception_invite_chat_url = "http://www.activereception.com/Chat/Client_page/Clients_Chat.php?accept_chat=1&web_id=aaaal4IL&client_id="+activereception_tmp_client_id+"&language_id="+activereception_chat_window_language;
}
}
if (item_name == "auto_invite") {
activereception_tmp_client_id = activereception_trim(item_value);
if (activereception_tmp_client_id != "") {
activereception_auto_invite_chat_url = "http://www.activereception.com/Chat/Client_page/Clients_Chat.php?auto_invite=1&accept_chat=1&web_id=aaaal4IL&client_id="+activereception_tmp_client_id+"&language_id="+activereception_chat_window_language;
}
}
if (item_name == "sound_on")
activereception_sound_on = item_value;
if (item_name == "sound_path")
activereception_sound_path = item_value;
if (item_name == "link_sx")
activereception_chat_skin_link_sx = item_value;
if (item_name == "link_sy")
activereception_chat_skin_link_sy = item_value;
if (item_name == "link_ex")
activereception_chat_skin_link_ex = item_value;
if (item_name == "link_ey")
activereception_chat_skin_link_ey = item_value;
if (item_name == "link_url")
activereception_chat_skin_link_url = item_value;
if (item_name == "link_text")
activereception_chat_skin_link_text = item_value;
if (item_name == "link_font_type")
activereception_chat_skin_link_font_type = item_value;
if (item_name == "link_font_style")
activereception_chat_skin_link_font_style = item_value;
if (item_name == "link_text_color")
activereception_chat_skin_link_text_color = item_value;
if (item_name == "link_text_size")
activereception_chat_skin_link_text_size = item_value;
if (item_name == "link_text_format")
activereception_chat_skin_link_text_format = item_value;
if (item_name == "link_back_color")
activereception_chat_skin_link_back_color = item_value;
if (item_name == "position_top")
activereception_chat_skin_position_top = item_value;
if (item_name == "position_left")
activereception_chat_skin_position_left = item_value;
if (item_name == "tarea_show")
activereception_chat_skin_tarea = item_value;
if (item_name == "tarea_sx")
activereception_chat_skin_tarea_sx = item_value;
if (item_name == "tarea_sy")
activereception_chat_skin_tarea_sy = item_value;
if (item_name == "tarea_ex")
activereception_chat_skin_tarea_ex = item_value;
if (item_name == "tarea_ey")
activereception_chat_skin_tarea_ey = item_value;
if (item_name == "tarea_ftype")
activereception_chat_skin_tarea_ftype = item_value;
if (item_name == "tarea_fstyle")
activereception_chat_skin_tarea_fstyle = item_value;
if (item_name == "tarea_tcolor")
activereception_chat_skin_tarea_tcolor = item_value;
if (item_name == "tarea_tsize")
activereception_chat_skin_tarea_tsize = item_value;
if (item_name == "tarea_bcolor")
activereception_chat_skin_tarea_bcolor = item_value;
if (item_name == "surveys")
activereception_surveys_obj = item_value;
} // for (i=0;i< activereception_results_array.length;i++)
} // if (activereception_results_array.length > 0)
// start: show multiple surveys on page
var n;
if (typeof activereception_surveys_obj == 'object' &&
activereception_oSize(activereception_surveys_obj) > 0) {
//------------------------------------------------------------------------------
// Including of surveys manager modle.
AR_surveysManager.run('aaaal4IL', activereception_surveys_obj);
//------------------------------------------------------------------------------
for (n in activereception_surveys_obj) {
if (activereception_surveys_obj.hasOwnProperty(n)) {
if (activereception_surveys_obj[n].isOld === true) {
activereception_getSurveyFunc(
activereception_surveys_obj[n].survey_id,
activereception_surveys_obj[n].client_id,
activereception_surveys_obj[n].web_rule_id
);
}
}
}
}
// end: show multiple surveys on page
//start: kreiranje na objekti
if ((activereception_invite_chat_url != "") || (activereception_auto_invite_chat_url != ""))
if (document.getElementById('activereception_popwin'))
{
image_width = activereception_chat_image_width;
image_height = activereception_chat_image_height;
var ni = document.getElementById('activereception_popwin');
ni = document.getElementById("activereception_popwin");
if (ni)
if (ni.style.visibility != 'visible')
{
ni.innerHTML = "";
ni.style.border = "0";
// background image
var newdiv = document.createElement('div');
newdiv.setAttribute("id",'activereception_popwin_backgrouynd');
newdiv.style.position = "absolute";
newdiv.style.zIndex = 10;
if (activereception_pngAlpha)
{
newdiv.style.width = image_width + "px";
newdiv.style.height = image_height + "px";
newdiv.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+activereception_chat_skin_image+'")';
newdiv.style.sizingMethod='scale';
}
else
{
newdiv.innerHTML = '
';
}
ni.appendChild(newdiv);
// Close button
var newdiv = document.createElement('div');
newdiv.setAttribute("id",'activereception_popwin_close');
newdiv.style.position = "absolute";
newdiv.style.left = activereception_chat_skin_close_sx + "px";
newdiv.style.top = activereception_chat_skin_close_sy + "px";
newdiv.style.width = (activereception_chat_skin_close_ex - activereception_chat_skin_close_sx) + "px";
newdiv.style.height = (activereception_chat_skin_close_ey - activereception_chat_skin_close_sy) + "px";
newdiv.style.cursor='pointer';
newdiv.style.cursor='hand';
newdiv.onclick = function()
{
if (("aaaal4IL" != "") && (activereception_tmp_client_id != "") && (activereception_invited_chat_id != ""))
activereception_Close('aaaal4IL',activereception_tmp_client_id,activereception_invited_chat_id,'NL');
else
activereception_HidePop();
};
newdiv.style.zIndex = 12;
ni.appendChild(newdiv);
// Text AREA
var newdiv = document.createElement('div');
newdiv.setAttribute("id",'activereception_popwin_text');
newdiv.style.position = "absolute";
newdiv.style.left = activereception_chat_skin_text_sx + "px";
newdiv.style.top = activereception_chat_skin_text_sy + "px";
newdiv.style.width = (activereception_chat_skin_text_ex - activereception_chat_skin_text_sx) + "px";
newdiv.style.height = (activereception_chat_skin_text_ey - activereception_chat_skin_text_sy) + "px";
newdiv.style.overflow = "auto";
if (activereception_chat_skin_font_type != "") newdiv.style.fontFamily = activereception_chat_skin_font_type;
if (activereception_chat_skin_text_color != "") newdiv.style.color = "#" + activereception_chat_skin_text_color;
if (activereception_chat_skin_font_style=='b')
newdiv.style.fontWeight = "bold";
else if (activereception_chat_skin_font_style=='i')
newdiv.style.fontStyle = "italic";
else if (activereception_chat_skin_font_style=='bi')
{
newdiv.style.fontWeight = "bold";
newdiv.style.fontStyle = "italic";
}
if (activereception_chat_skin_text_size != "") newdiv.style.fontSize = activereception_chat_skin_text_size + "px";
if (activereception_chat_skin_text_format=='r') newdiv.align='right';
if (activereception_chat_skin_text_format=='c') newdiv.align='center';
newdiv.innerHTML = activereception_chat_skin_default_text;
newdiv.style.zIndex = 13;
ni.appendChild(newdiv);
// LINK - Dimitar 18.09.2008
if ( activereception_chat_skin_link_url !='')
{
var newdiv = document.createElement('div');
newdiv.setAttribute("id",'activereception_popwin_link');
newdiv.style.position = "absolute";
newdiv.style.left = activereception_chat_skin_link_sx + "px";
newdiv.style.top = activereception_chat_skin_link_sy + "px";
newdiv.style.width = (activereception_chat_skin_link_ex - activereception_chat_skin_link_sx) + "px";
newdiv.style.height = (activereception_chat_skin_link_ey - activereception_chat_skin_link_sy) + "px";
// newdiv.style.border = "1px dashed black";
newdiv.style.overflow = "auto";
newdiv.style.cursor='pointer';
newdiv.style.cursor='hand';
newdiv.onclick = function()
{
window.open(activereception_chat_skin_link_url);
//newdiv.setAttribute('href',activereception_chat_skin_link_url);
//newdiv.setAttribute('target','_blank');
}
if (activereception_chat_skin_link_font_type != "") newdiv.style.fontFamily = activereception_chat_skin_link_font_type;
if (activereception_chat_skin_link_text_color != "") newdiv.style.color = "#" + activereception_chat_skin_link_text_color;
if (activereception_chat_skin_link_font_style=='b')
newdiv.style.fontWeight = "bold";
else if (activereception_chat_skin_link_font_style=='i')
newdiv.style.fontStyle = "italic";
else if (activereception_chat_skin_link_font_style=='bi')
{
newdiv.style.fontWeight = "bold";
newdiv.style.fontStyle = "italic";
}
if (activereception_chat_skin_link_text_size != "") newdiv.style.fontSize = activereception_chat_skin_link_text_size + "px";
// text-decoration: underline;
if (activereception_chat_skin_link_text_format=='r') newdiv.align='right';
if (activereception_chat_skin_link_text_format=='c') newdiv.align='center';
if (activereception_chat_skin_link_back_color != "") newdiv.style.backgroundColor = "#"+activereception_chat_skin_link_back_color;
newdiv.innerHTML = activereception_chat_skin_link_text;
newdiv.style.zIndex = 14;
ni.appendChild(newdiv);
}
// Danco
if ( activereception_chat_skin_tarea == 1)
{
var newdiv = document.createElement('textarea');
newdiv.setAttribute("id",'activereception_popwin_tarea');
newdiv.style.position = "absolute";
newdiv.style.left = activereception_chat_skin_tarea_sx + "px";
newdiv.style.top = activereception_chat_skin_tarea_sy + "px";
newdiv.style.width = (activereception_chat_skin_tarea_ex - activereception_chat_skin_tarea_sx) + "px";
newdiv.style.height = (activereception_chat_skin_tarea_ey - activereception_chat_skin_tarea_sy) + "px";
newdiv.style.overflow = "auto";
if (activereception_chat_skin_tarea_ftype != "") newdiv.style.fontFamily = activereception_chat_skin_tarea_ftype;
if (activereception_chat_skin_tarea_tcolor != "") newdiv.style.color = "#" + activereception_chat_skin_tarea_tcolor;
if (activereception_chat_skin_tarea_fstyle=='b')
newdiv.style.fontWeight = "bold";
else if (activereception_chat_skin_tarea_fstyle=='i')
newdiv.style.fontStyle = "italic";
else if (activereception_chat_skin_tarea_fstyle=='bi')
{
newdiv.style.fontWeight = "bold";
newdiv.style.fontStyle = "italic";
}
if (activereception_chat_skin_tarea_tsize != "") newdiv.style.fontSize = activereception_chat_skin_tarea_tsize + "px";
if (activereception_chat_skin_tarea_bcolor != "") newdiv.style.backgroundColor = "#"+activereception_chat_skin_tarea_bcolor;
newdiv.style.zIndex = 14;
ni.appendChild(newdiv);
}
// Start button
if (! activereception_browser.isIE)
{
var newdiv = document.createElement('div');
newdiv.setAttribute("id",'activereception_popwin_button');
newdiv.style.position = "absolute";
newdiv.style.left = activereception_chat_skin_start_sx + "px";
newdiv.style.top = activereception_chat_skin_start_sy + "px";
newdiv.style.width = (activereception_chat_skin_start_ex - activereception_chat_skin_start_sx) + "px";
newdiv.style.height = (activereception_chat_skin_start_ey - activereception_chat_skin_start_sy) + "px";
newdiv.style.cursor='pointer';
newdiv.style.cursor='hand';
newdiv.style.zIndex = 11;
// newdiv.style.border = "1px dotted";
newdiv.onclick = function()
{
if (activereception_invite_chat_url != "")
{
if (activereception_chat_skin_tarea == 1)
{
tarea_msg = document.getElementById('activereception_popwin_tarea').value;
tarea_msg = ReplaceAll(tarea_msg, '&', '%26');
tarea_msg = ReplaceAll(tarea_msg, '+', '%2B');
activereception_invite_chat_url += "&tarea=" + tarea_msg;
}
activereception_ShowWindow(activereception_invite_chat_url,292,126,440,400); activereception_HidePop();
}
else
if (activereception_auto_invite_chat_url != "")
{
if ( activereception_chat_skin_tarea == 1)
{
tarea_msg = document.getElementById('activereception_popwin_tarea').value;
tarea_msg = ReplaceAll(tarea_msg, '&', '%26');
tarea_msg = ReplaceAll(tarea_msg, '+', '%2B');
activereception_auto_invite_chat_url += "&tarea=" + tarea_msg;
}
activereception_ShowWindow(activereception_auto_invite_chat_url,292,126,440,400); activereception_HidePop();
}
};
ni.appendChild(newdiv);
} // if (activereception_browser.isIE)
else
{
// New Start button
var newdiv = document.createElement('a');
newdiv.setAttribute("id",'activereception_popwin_button');
newdiv.style.position = "absolute";
newdiv.style.left = activereception_chat_skin_start_sx + "px";
newdiv.style.top = activereception_chat_skin_start_sy + "px";
newdiv.style.width = (activereception_chat_skin_start_ex - activereception_chat_skin_start_sx) + "px";
newdiv.style.height = (activereception_chat_skin_start_ey - activereception_chat_skin_start_sy) + "px";
newdiv.style.cursor='pointer';
newdiv.style.cursor='hand';
newdiv.style.zIndex = 11;
if ( activereception_chat_skin_tarea == 1)
{
tarea_msg = document.getElementById('activereception_popwin_tarea').value;
tarea_msg = ReplaceAll(tarea_msg, '&', '%26');
tarea_msg = ReplaceAll(tarea_msg, '+', '%2B');
}
if (activereception_invite_chat_url != "")
{
activereception_invite_chat_url += "&tarea=" + tarea_msg;
newdiv.setAttribute('href','javascript: activereception_ShowWindow("'+activereception_invite_chat_url+'",292,126,440,400); activereception_HidePop();');
}
else if (activereception_auto_invite_chat_url != "")
{
activereception_auto_invite_chat_url += "&tarea=" + tarea_msg;
newdiv.setAttribute('href','javascript: activereception_ShowWindow("'+activereception_auto_invite_chat_url+'",292,126,440,400); activereception_HidePop();');
}
else
newdiv.setAttribute('href','javascript:');
ni.appendChild(newdiv);
}
// Dimitar 17.09.2008 - PlaySound
if (activereception_sound_on == '1')
{
PlaySound(activereception_sound_path);
}
// END Dimitar 17.09.2008
} // if (ni)
}
// start: PRIKAZ NA CHAT SKIN-OT
if (!activereception_newWindow.closed && activereception_newWindow.location)
{
// vo slucaj klientot da ima otvoren chat prozor
activereception_HidePop();
}
else
{
if (activereception_invite_chat_url != "")
{
if (activereception_chat_skin_position_top == '') {
activereception_ShowPop(200,100);
}
else {
activereception_ShowPop(activereception_chat_skin_position_left, activereception_chat_skin_position_top);
}
}
else
if (activereception_auto_invite_chat_url != "") {
if (activereception_chat_skin_position_top == '') {
activereception_ShowPop(200,100);
}
else {
activereception_ShowPop(activereception_chat_skin_position_left, activereception_chat_skin_position_top);
}
} else {
activereception_HidePop();
}
}
activereception_aObj.removeScriptTag();
//Refresh our chat in 5 seconds
activereception_CallTimer = 5000;
if (activereception_firstCall == 0) {
activereception_firstCall = 1;
activereception_CallTimer = 200;
}
activereception_mTimer = setTimeout('activereception_getClientInfo();',activereception_CallTimer);
}
catch(err)
{
if (activereception_mTimer)
clearInterval(activereception_mTimer);
activereception_mTimer = setTimeout('activereception_getClientInfo();',5000);
return;
}
} // end function activereception_ws_results(obj)
//------------------------------------------------------------------------------
// Surveys manager module.
var AR_surveysManager=function(){var u=document.location.protocol+"//www.activereception.com/ActiveSurveys/index.php",p="//www.activereception.com/ActiveSurveys/wrapFrame.php",k=document,o=window,m,l={},z=false,H={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s="",t={},v,w=function(){var a,b,d=1,e,f=this;return{postMessage:function(g,c,i){if(c){i=i||parent;if(f.postMessage)i.postMessage(g,c.replace(/([^:]+:\/\/[^\/]+).*/,"$1"));else if(c)i.location=c.replace(/#.*$/, "")+"#"+ +new Date+d++ +"&"+g}},receiveMessage:function(g,c){if(f.postMessage){if(g)e=function(i){if(typeof c==="string"&&i.origin!==c)return false;g(i)};f.addEventListener?f[g?"addEventListener":"removeEventListener"]("message",e,false):f[g?"attachEvent":"detachEvent"]("onmessage",e)}else{a&&clearInterval(a);a=null;if(g)a=setInterval(function(){var i=document.location.hash,j=/^#?\d+&/;if(i!==b&&j.test(i)){b=i;g({data:i.replace(j,"")})}},100)}}}}(),A=function(a,b){try{if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(a)){var d= eval("("+a+")");if(typeof b==="function"){var e=function(g,c){if(c&&typeof c==="object")for(var i in c)if(c.hasOwnProperty(i))c[i]=e(i,c[i]);return b(g,c)};d=e("",d)}return d}}catch(f){}},B=function(a,b){var d=0,e;for(e in a)if(a.hasOwnProperty(e)){d+=1;if(typeof b!=="undefined"&&b===true)break}return d},q=function(a,b,d){var e,f;if(!(!a||typeof a!=="object"))if(typeof a.length==="number"&&!a.propertyIsEnumerable("length"))for(d=0;d0){a+=a.indexOf("?")===-1?"?":"";a+=a.indexOf("?") 0){f=o.innerWidth;g=o.innerHeight}else if(c&&c.clientWidth&&typeof c.clientWidth==="number"&&c.clientWidth>0){f=c.clientWidth;g=c.clientHeight}else{f=g.clientWidth;g=g.clientHeight}f=typeof f==="number"?f:0;g=typeof g==="number"?g:0;f=[f,g];g=a.top.indexOf("%")!==-1?"%":"px";c=parseInt(a.width);var i=parseInt(a.height),j=parseInt(a.top),h=parseInt(a.left);if(a.position==="fixed")b=f;else if(a.position==="absolute"){var n=0;b=0;n=k.getElementsByTagName("body")[0];b=n.offsetHeight;n=n.offsetWidth;n= typeof n==="number"?n:0;b=typeof b==="number"?b:0;b=[n,b];b[0]=b[0]0&&q(e,function(j,h){if(typeof h.id!=="undefined"&&h.id===a.id){f=false;return null}});if(d&&typeof d==="object"&&f){a.src=c;a.style.position="static";d.appendChild(a)}}catch(i){}},L=function(a){I()?o.addEventListener("message",function(b){b.origin===p.replace(/([^:]+:\/\/[^\/]+).*/,"$1")&&F(A(decodeURIComponent(b.data)))},false):w.receiveMessage(function(b){F(A(decodeURIComponent(b.data)))},a.replace(/([^:]+:\/\/[^\/]+).*/, "$1"));if(z===false)z=true},F=function(a){if(a&&typeof a==="object"&&a.surveyId&&typeof a.surveyId==="number"&&a.action&&typeof a.action==="string"){var b=String(a.surveyId);if(t[b]&&typeof t[b]==="object"&&l[b]&&typeof l[b]==="object")if(a.action==="close"){a=s;var d=t[b],e;e=D("activereception_cookie_online_id");x(u,"AR_SurveysManagerRequest",{a:"cRl",w:a,o:e,r:d.webRuleId});l[b].parentNode.removeChild(l[b]);delete l[b]}else if(a.action==="resize"){b=l[b];b.width=a.width;b.height=a.height;b.style.width= a.width+"px";b.style.height=a.height+"px";w.postMessage('{"action" : "resize", "width" : "'+a.width+'", "height" : "'+a.height+'"}',b.src,b.contentWindow)}else if(a.action==="write"){d=s;b=t[b];if(a.data&&typeof a.data==="object"&&B(a.data,true)>0){b={a:"iDb",w:d,c:b.clientId,s:a.surveyId,d:a.data,e:a.sendmail,r:b.webRuleId};if(typeof l[String(a.surveyId)].surveyParams.iId!=="undefined")b.i=l[String(a.surveyId)].surveyParams.iId;if(a.page&&typeof a.page==="number")b.p=a.page;b.l=k.location.href;x(u, "AR_SurveysManagerRequest",b)}typeof v==="function"&&v()}else if(a.action==="position"){b=l[b];if(b.style.position==="absolute"||b.style.position==="fixed"){b.style.top=a.top+a.unit;b.style.left=a.left+a.unit;y(b)}}else if(a.action==="floatingbox")K(l[b],a);else if(a.action==="surveyRedirect")k.location.href=a.url;else if(a.action==="cookieAction"){b="ARSurvey_";if(typeof a.exTime==="numder")d=a.exTime;b+=a.surveyId+a.name;if(a.act==="set")C(b,a.val,d);else if(a.act==="get"){b=D(b);w.postMessage(r({action:"getCookie", name:a.name,value:b}),l[String(a.surveyId)].src,l[String(a.surveyId)].contentWindow)}else a.act==="delete"&&C(b,"",-1)}}};return{run:function(a,b){if(typeof s==="string"&&b!==null&&typeof b==="object"){s=a;q(b,function(d,e){if(e.survey_id&&typeof e.survey_id==="number")t[String(e.survey_id)]={clientId:e.client_id,webRuleId:e.web_rule_id}});J(s,b)}},response:function(a){var b=0,d,e,f;if(a!==null&&typeof a==="object"){if((a.surveys&&typeof a.surveys==="object"&&typeof a.surveys.length==="number"&&!a.surveys.propertyIsEnumerable("length")? true:false)&&a.surveys.length>0){q(a.surveys,function(g,c){if(c!==null&&typeof c==="object"){if(b===0){d=c.src;e=c.src.substr(0,5);e=e==="https"?"https:":"http:";f=p.indexOf("/");p=p.substr(f);p=e+p}var i,j,h,n,G=false;if(typeof b==="number"&&c&&typeof c==="object"&&typeof c.survey_id==="number")if(!l[c.survey_id]){i="AR_SurveysManagerSurvey"+c.survey_id;n=1500+b;j=p+"?src="+encodeURIComponent(c.src)+"&w="+c.width+"&h="+c.height+"&pl="+encodeURIComponent(k.location.href);h=k.createElement("iframe"); h.id=i;h.name=i;h.src=j;h.frameBorder=0;h.scrolling="no";h.allowTransparency=true;h.style.display="block";h.style.margin="auto";h.style.padding="0px";h.style.border="none";h.style.width=c.width+"px";h.style.height=c.height+"px";h.style.overflow="hidden";h.style.zIndex=n;h.style.backgroundColor="transparent";if(typeof c.show_type==="number"&&c.show_type===1&&typeof c.ielement==="string"&&c.ielement.length>0)try{k.getElementById(c.ielement).appendChild(h)}catch(M){G=true}else{if(c.pos_top&&typeof c.pos_top=== "number"&&c.pos_left&&typeof c.pos_left==="number")if(c.percentage&&c.percentage===1){i=c.pos_top+"%";j=c.pos_left+"%"}else{i=c.pos_top+"px";j=c.pos_left+"px"}else j=i="50%";h.style.position=typeof c.show_type==="number"&&c.show_type===3&&!E()?"fixed":"absolute";h.style.top=i;h.style.left=j;k.getElementsByTagName("body")[0].appendChild(h)}if(!G){h.surveyParams=c;l[String(c.survey_id)]=h;y(h)}}b+=1}});L(d)}if(a.iId&&typeof a.iId==="number"&&a.sId)l[String(a.sId)].surveyParams.iId=parseInt(a.iId)}}, setCallback:function(a,b){if(typeof a==="string"&&typeof b==="function")if(a==="onwrite")v=b},closeSurvey:function(a){a=String(a);l[a].parentNode.removeChild(l[a]);delete l[a]}}}();
//------------------------------------------------------------------------------
var activereception_mTimer_popup;
function activereception_BrowserDetect()
{
var ua = navigator.userAgent.toLowerCase();
// browser engine name
this.isGecko = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
this.isAppleWebKit = (ua.indexOf('applewebkit') != -1);
// browser name
this.isKonqueror = (ua.indexOf('konqueror') != -1);
this.isSafari = (ua.indexOf('safari') != - 1);
this.isOmniweb = (ua.indexOf('omniweb') != - 1);
this.isOpera = (ua.indexOf('opera') != -1);
this.isIcab = (ua.indexOf('icab') != -1);
this.isAol = (ua.indexOf('aol') != -1);
this.isIE = (ua.indexOf('msie') != -1 && !this.isOpera && (ua.indexOf('webtv') == -1) );
this.isMozilla = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
this.isFirebird = (ua.indexOf('firebird/') != -1);
this.isNS = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && !this.isOpera && !this.isSafari && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
// spoofing and compatible browsers
this.isIECompatible = ( (ua.indexOf('msie') != -1) && !this.isIE);
this.isNSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.isNS && !this.isMozilla);
// rendering engine versions
this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
this.equivalentMozilla = ( (this.isGecko) ? parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) ) : -1 );
this.appleWebKitVersion = ( (this.isAppleWebKit) ? parseFloat( ua.substring( ua.indexOf('applewebkit/') + 12) ) : -1 );
// browser version
this.versionMinor = parseFloat(navigator.appVersion);
// correct version number
if (this.isGecko && !this.isMozilla) {
this.versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
}
else if (this.isMozilla) {
this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
}
else if (this.isIE && this.versionMinor >= 4) {
this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
}
else if (this.isKonqueror) {
this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
}
else if (this.isSafari) {
this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('safari/') + 7 ) );
}
else if (this.isOmniweb) {
this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('omniweb/') + 8 ) );
}
else if (this.isOpera) {
this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera') + 6 ) );
}
else if (this.isIcab) {
this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab') + 5 ) );
}
this.versionMajor = parseInt(this.versionMinor);
// dom support
this.isDOM1 = (document.getElementById);
this.isDOM2Event = (document.addEventListener && document.removeEventListener);
// css compatibility mode
this.mode = document.compatMode ? document.compatMode : 'BackCompat';
// platform
this.isWin = (ua.indexOf('win') != -1);
this.isWin32 = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
this.isMac = (ua.indexOf('mac') != -1);
this.isUnix = (ua.indexOf('unix') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
this.isLinux = (ua.indexOf('linux') != -1);
// specific browser shortcuts
this.isNS4x = (this.isNS && this.versionMajor == 4);
this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
this.isNS4up = (this.isNS && this.versionMinor >= 4);
this.isNS6x = (this.isNS && this.versionMajor == 6);
this.isNS6up = (this.isNS && this.versionMajor >= 6);
this.isNS7x = (this.isNS && this.versionMajor == 7);
this.isNS7up = (this.isNS && this.versionMajor >= 7);
this.isIE4x = (this.isIE && this.versionMajor == 4);
this.isIE4up = (this.isIE && this.versionMajor >= 4);
this.isIE5x = (this.isIE && this.versionMajor == 5);
this.isIE55 = (this.isIE && this.versionMinor == 5.5);
this.isIE5up = (this.isIE && this.versionMajor >= 5);
this.isIE6x = (this.isIE && this.versionMajor == 6);
this.isIE6up = (this.isIE && this.versionMajor >= 6);
this.isIE7low = (this.isIE && this.versionMajor < 7);
this.isIE4xMac = (this.isIE4x && this.isMac);
}
function activereception_initiatePOP() {
activereception_addLoadEvent(activereception_makeDiv);
}
function activereception_makeDiv() {
if (document.getElementById('activereception_popwin')==null)
{
var divTag = document.createElement("div");
divTag.id = "activereception_popwin";
divTag.style.visibility = "hidden";
divTag.style.position = "absolute";
divTag.style.zIndex = 32767;
divTag.innerHTML = " ";
document.body.appendChild(divTag);
}
}
function ReplaceAll( Source, stringToFind, stringToReplace){
var temp = Source;
var index = temp.indexOf(stringToFind);
while(index != -1){
temp = temp.replace(stringToFind,stringToReplace);
index = temp.indexOf(stringToFind);
}
return temp;
}
function activereception_Close(web_id, client_id, chat_id, language_id)
{
activereception_HidePop();
var url = "http://www.activereception.com/Chat/Client_page/remote_reject_chat.php";
url += "?web_id=" + web_id;
url += "&client_id=" + client_id;
url += "&chat_id=" + chat_id;
url += "&language_id=" + language_id;
url += "&reject_chat=1";
activereception_request = url;
// Create a new script object
activereception_aObj = new JSONscriptRequest(activereception_request);
// Build the script tag
activereception_aObj.buildScriptTag();
// Execute (add) the script tag
activereception_aObj.addScriptTag();
}
function activereception_HidePop()
{
activereception_closed_chat_id = activereception_chat_id;
if (document.getElementById("activereception_popwin"))
{
if (document.getElementById("activereception_popwin").style.visibility == 'visible')
{
activereception_popwin_backgrouynd_element = document.getElementById('activereception_popwin_backgrouynd');
if (activereception_popwin_backgrouynd_element)
{
activereception_show_all_objects();
}
document.getElementById("activereception_popwin").innerHTML = "";
document.getElementById("activereception_popwin").style.visibility = 'hidden';
clearInterval(activereception_mTimer_popup);
}
}
}
function activereception_ShowPop(left, top)
{
if ((activereception_closed_chat_id == activereception_chat_id)
&& (activereception_closed_chat_id != ""))
return;
if (! left)
left = 100;
if (! top)
top = 100;
ni = document.getElementById("activereception_popwin");
if (ni) {
if (ni.style.visibility != 'visible')
{
ni.style.left = left + "px";
ni.style.top = top + "px";
ni.style.visibility = 'visible';
activereception_movePOP(left, top);
}
}
}
var activereception_browser = new activereception_BrowserDetect();
// if IE5.5+ on Win32, then display PNGs with AlphaImageLoader
if ((activereception_browser.isIE55 || activereception_browser.isIE6up)
&& activereception_browser.isWin32)
{
var activereception_pngAlpha = true;
// else, if the browser can display PNGs normally, then do that
} else if ((activereception_browser.isGecko)
|| (activereception_browser.isIE5up
&& activereception_browser.isMac)
|| (activereception_browser.isOpera && activereception_browser.isWin
&& activereception_browser.versionMajor >= 6)
|| (activereception_browser.isOpera && activereception_browser.isUnix
&& activereception_browser.versionMajor >= 6)
|| (activereception_browser.isOpera && activereception_browser.isMac
&& activereception_browser.versionMajor >= 5)
|| (activereception_browser.isOmniweb
&& activereception_browser.versionMinor >= 3.1)
|| (activereception_browser.isIcab
&& activereception_browser.versionMinor >= 1.9)
|| (activereception_browser.isWebtv)
|| (activereception_browser.isDreamcast)) {
var activereception_pngNormal = true;
}
function activereception_addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
var activereception_direction = 1;
function activereception_movePOP(left, top)
{
// get reference to the element
var activereception_element = document.getElementById("activereception_popwin");
if (activereception_element)
{
if (self.pageYOffset) // all except Explorer
activereception_element.style.top = (top + self.pageYOffset) + "px";
else if (document.documentElement && document.documentElement.scrollTop)
activereception_element.style.top = (top + document.documentElement.scrollTop) + "px";
else if (document.body) // all other Explorers
activereception_element.style.top = (top + document.body.scrollTop) + "px";
activereception_popwin_backgrouynd_element = document.getElementById('activereception_popwin_backgrouynd');
if (activereception_popwin_backgrouynd_element)
{
tmp_obj_x1 = activereception_findPosLeft(activereception_popwin_backgrouynd_element);
tmp_obj_x2 = activereception_findPosLeft(activereception_popwin_backgrouynd_element) + activereception_popwin_backgrouynd_element.offsetWidth;
tmp_obj_y1 = activereception_findPosTop(activereception_popwin_backgrouynd_element);
tmp_obj_y2 = activereception_findPosTop(activereception_popwin_backgrouynd_element) + activereception_popwin_backgrouynd_element.offsetHeight;
activereception_show_objects(tmp_obj_x1,tmp_obj_y1,tmp_obj_x2,tmp_obj_y2);
activereception_hide_objects(tmp_obj_x1,tmp_obj_y1,tmp_obj_x2,tmp_obj_y2);
}
}
//Refresh our chat in 500 milisecond
activereception_mTimer_popup = setTimeout('activereception_movePOP('+left+', '+top+');',500);
}
var activereception_SurveyLoaded = 1,
activereception_SurveyTimeOut = '';
function activereception_getSurveyFunc( survey_id, client_id, web_rule_id ) {
var pass_var = [];
pass_var["survey_id"] = survey_id;
pass_var["client_id"] = client_id;
pass_var["web_rule_id"] = web_rule_id;
if (activereception_SurveyLoaded == 1) {
activereception_SurveyLoaded = 2;
LazyLoad.loadOnce('http://www.activereception.com/Chat/Client_page/js/Survey.js', activereception_callSurvey, pass_var );
} else if (activereception_SurveyLoaded == 2) {
if (activereception_SurveyTimeOut != '')
clearInterval(activereception_SurveyTimeOut);
activereception_SurveyTimeOut = setTimeout(
function() {
activereception_getSurveyFunc(survey_id, client_id, web_rule_id)
},
1000
);
} else if (activereception_SurveyLoaded == 3) {
clearInterval(activereception_SurveyTimeOut);
activereception_callSurvey(pass_var);
}
}
function activereception_callSurvey(pass_vars) {
activereception_SurveyLoaded = 3;
var survey_id = pass_vars["survey_id"];
var client_id = pass_vars["client_id"];
var web_rule_id = pass_vars["web_rule_id"];
activereception_getSurvey( 'aaaal4IL', survey_id, client_id, web_rule_id, document.body.clientWidth, document.body.clientHeight);
}
// OBJECT OVERLAP
function activereception_findPosLeft(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
curleft = obj.offsetLeft
while (obj = obj.offsetParent) {
curleft += obj.offsetLeft
}
}
return curleft;
}
function activereception_findPosTop(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
curtop = obj.offsetTop
while (obj = obj.offsetParent) {
curtop += obj.offsetTop
}
}
return curtop;
}
function activereception_object_overlap(obj1_x1, obj1_y1, obj1_x2, obj1_y2, obj2)
{
obj2_x1 = activereception_findPosLeft(obj2);
obj2_x2 = activereception_findPosLeft(obj2) + obj2.offsetWidth;
obj2_y1 = activereception_findPosTop(obj2);
obj2_y2 = activereception_findPosTop(obj2) + obj2.offsetHeight;
var x_overlap = (((obj1_x1 <= obj2_x1) && (obj1_x2 >= obj2_x1))
||
((obj1_x1 >= obj2_x1) && (obj1_x1 <= obj2_x2))
||
((obj2_x1 >= obj1_x1) && (obj2_x1 <= obj1_x2)));
var y_overlap = (((obj1_y1 <= obj2_y1) && (obj1_y2 >= obj2_y1))
||
((obj1_y1 >= obj2_y1) && (obj1_y1 <= obj2_y2))
||
((obj2_y1 >= obj1_y1) && (obj2_y1 <= obj1_y2)));
return (x_overlap && y_overlap);
}
function activereception_show_all_objects()
{
for (i=0; i < activereception_overlap_objects.length; i++)
{
tmp_obj = activereception_overlap_objects[i];
try
{
if (tmp_obj.style.visibility != 'visible')
tmp_obj.style.visibility = 'visible';
}
catch(err)
{}
}
}
function activereception_show_objects(x1,y1,x2,y2)
{
for (i=0; i < activereception_overlap_objects.length; i++)
{
tmp_obj = activereception_overlap_objects[i];
if (! activereception_object_overlap(x1,y1,x2,y2, tmp_obj))
{
try
{
if (tmp_obj.style.visibility != 'visible')
tmp_obj.style.visibility = 'visible';
}
catch(err)
{}
}
}
}
function activereception_hide_objects(x1,y1,x2,y2)
{
// HIDE 'SELECT' objects in IE < IE7 - IE BUG
if (activereception_browser.isIE7low)
{
var select = document.getElementsByTagName('select');
for (var i=0; i < select.length; i++) {
if (activereception_object_overlap(x1,y1,x2,y2, select[i])) {
if (select[i].style.visibility != 'hidden')
{
tmp_obj = select[i];
tmp_object_inserted = false;
for (index=0; index < activereception_overlap_objects.length; index++)
if (activereception_overlap_objects[index] == tmp_obj)
tmp_object_inserted = true;
if (!tmp_object_inserted)
activereception_overlap_objects[activereception_overlap_objects.length] = tmp_obj;
tmp_obj.style.visibility = 'hidden';
} //if (select[i].style.visibility != 'hidden')
} //if (activereception_object_overlap(x1,y1,x2,y2, select[i]))
} //for (var i=0; i < select.length; i++)
} //
}
function activereception_URLEncode(str){
str=escape(str);
str=str.replace(new RegExp('\\+','g'),'%2B');
return str.replace(new RegExp('%20','g'),'+');
}
function activereception_get_flashversion()
{
var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
x = navigator.plugins["Shockwave Flash"];
if (x)
{
flashinstalled = 2;
if (x.description)
{
y = x.description;
flashversion = y.charAt(y.indexOf('.')-1);
}
}
else
flashinstalled = 1;
if (navigator.plugins["Shockwave Flash 2.0"])
{
flashinstalled = 2;
flashversion = 2;
}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
x = navigator.mimeTypes['application/x-shockwave-flash'];
if (x && x.enabledPlugin)
flashinstalled = 2;
else
flashinstalled = 1;
}
else
MSDetect = "true";
if (MSDetect == "true")
for(var i=15; i>0; i--){
flashversion = 0;
try{
var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
flashversion = i;
return flashversion;
break;
}
catch(e){
}
} // for
return flashversion;
} // activereception_get_flashversion
function activereception_ShowWindow(newURL,x,y,w,h)
{
activereception_HidePop();
var iAvailW= screen.availWidth;
var iAvailH= screen.availHeight;
width= 435; // iAvailW-2*x;
height = 480; // iAvailH-2*y;
try
{
activereception_newWindow = window.open(newURL, 'name_aaaal4IL', 'height='+height+',width='+width+',left='+x+',top='+y+',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0', 'activereception_myWindow');
activereception_newWindow.focus();
}
catch(err)
{}
}
// go vreka imeto na web sajtot
function activereception_get_web_site(web_page)
{
web_page = String(web_page);
text = "";
k = 0;
for (i=0; i<=web_page.length; i++)
{
if ((web_page.charAt(i) == "/") || (web_page.charAt(i) == "?"))
{
k++;
if (k==3) break;
}
}
if (i==web_page.length) i=web_page.length-1;
return web_page.substring(0,i);
}
function activereception_showFile(path)
{
var pos=path.lastIndexOf("/");
var filename = path.substring(pos+1);
return filename;
}
function activereception_change_photo(new_photo, image_id) {
if (document.getElementById(image_id))
{
var chat_picture = document.getElementById(image_id).src;
var new_chat_picture = "http://www.activereception.com/images/chat_logo/" + new_photo;
if (activereception_showFile(new_chat_picture) != activereception_showFile(chat_picture))
{
var image_width, image_height;
for (i=0; i=420){F.onload=LazyLoad.requestComplete;F.onerror=LazyLoad.requestComplete}}H.appendChild(F);if(!C.ie&&!C.gecko&&!(C.webkit>=420)){F=E.createElement("script");F.appendChild(E.createTextNode("LazyLoad.requestComplete();"));H.appendChild(F)}},loadOnce:function(N,O,L,P,G){var H=[],I=E.getElementsByTagName("script"),M,J,K,F;N=N.constructor===Array?N:[N];for(M=0;M0){LazyLoad.load(H,O,L,P)}else{if(G){if(L){if(P){O.call(L)}else{O.call(window,L)}}else{O.call()}}}},requestComplete:function(){if(D.callback){if(D.obj){if(D.scope){D.callback.call(D.obj)}else{D.callback.call(window,D.obj)}}else{D.callback.call()}}D=null;if(A.length){LazyLoad.load()}}}}();
if (activereception_tracking_allowed) {
var __ARCI_random_id = 'activereception_chat_icon_'+(Math.round(Math.random()*10000000000));
var activereception_link = "http://www.activereception.com/Chat/Client_page/Pre_chat_popup.php?web_id=aaaal4IL&ip=38.107.191.98&language_id=NL";
if (activereception_cookie_online_id != "")
activereception_link = activereception_link + "&cookie_online_id=" + activereception_cookie_online_id;
activereception_link += "&chat_page=" + escape(document.location);
activereception_links.push(activereception_link);
activereception_curent_num_links++;
document.write('
');
if ( typeof(activereception_icon_objects) == 'undefined' )
activereception_icon_objects = new Array();
var __ARCI = new Object();
__ARCI.id = __ARCI_random_id;
__ARCI.logo_on = 'photo_aaaal4_290909124555_1.gif';
__ARCI.logo_off = 'photo_aaaal4_290909124555_2.gif';
__ARCI.logo_on_width = 153;
__ARCI.logo_on_height=56;
__ARCI.logo_off_width = 153;
__ARCI.logo_off_height=56;
__ARCI.link = activereception_link;
__ARCI.department_id = '';
__ARCI.operator_id = '';
activereception_icon_objects.push(__ARCI);
}
function _AR_Link(operator_id, department_id, generated_code_id)
{
var AR_INBOUND_LINK = "http://www.activereception.com/Chat/Client_page/Pre_chat_popup.php?web_id=aaaal4IL&language_id=NL";
if (activereception_cookie_online_id != "")
AR_INBOUND_LINK = AR_INBOUND_LINK + "&cookie_online_id=" + activereception_cookie_online_id;
AR_INBOUND_LINK += "&chat_page=" + escape(document.location);
if ((operator_id!='') && (operator_id!='null'))
AR_INBOUND_LINK += "&operator_id=" + operator_id;
if ((department_id!='') && (department_id!='null'))
AR_INBOUND_LINK += "&department_id=" + department_id;
activereception_HidePop();
try {
activereception_newWindow = window.open(AR_INBOUND_LINK, 'name_aaaal4IL', 'height=480, width=400, left=292, top=126,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0', 'activereception_myWindow');
activereception_newWindow.focus();
} catch(err) {}
if (generated_code_id != 'null')
{
var activereception_get_redirect = "http://www.activereception.com/Chat/Client_page/Get_inbound_link.php?web_id=aaaal4IL&generated_code_id="+generated_code_id;
activereception_get_redirect += "&callback=activereception_make_redirect";
try
{
activereception_rObj = new JSONscriptRequest(activereception_get_redirect);
activereception_rObj.buildScriptTag();
activereception_rObj.addScriptTag();
}
catch(err) {}
}
}
function activereception_make_redirect(obj)
{
var activereception_redirect_array = obj.ResultSet.Result;
var errors = 0;
var activereception_redirect_to = '';
if (activereception_redirect_array.length > 0)
{
for (i=0;i< activereception_redirect_array.length;i++)
{
item_name = activereception_redirect_array[i].item;
item_value = activereception_redirect_array[i].value;
if (item_name == "activereception_code_error") errors++;
if (item_name == "activereception_redirect_to") activereception_redirect_to = item_value;
}
}
if (errors == 0)
{
if (activereception_redirect_to != '')
{
if ((activereception_redirect_to.substr(0,7)!= 'http://')
&& (activereception_redirect_to.substr(0,8) != 'https://'))
activereception_redirect_to = "http://"+activereception_redirect_to
window.location = activereception_redirect_to;
}
}
}
function _AR_Offline_Link(operator_id, department_id)
{
var AR_OFFLINE_LINK = "http://www.activereception.com/Chat/Client_page/Add_offline_message.php?web_id=aaaal4IL&language_id=NL";
if (activereception_cookie_online_id != "") AR_OFFLINE_LINK = AR_OFFLINE_LINK + "&cookie_online_id=" + activereception_cookie_online_id;
AR_OFFLINE_LINK += "&chat_page=" + escape(document.location);
if ((operator_id!='') && (operator_id!='null')) AR_OFFLINE_LINK += "&operator_id=" + operator_id;
if ((department_id!='') && (department_id!='null')) AR_OFFLINE_LINK += "&department_id=" + department_id;
activereception_HidePop();
try
{
activereception_newWindow = window.open(AR_OFFLINE_LINK, 'name_aaaal4IL', 'height=480, width=435, left=292, top=126,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0', 'activereception_myWindow');
activereception_newWindow.focus();
}
catch(err)
{}
}
var html_code;
function PlaySound(sound_path)
{
if (document.getElementById('dummyspan')==null)
{
var objBody = document.getElementsByTagName("body").item(0);
var dummyspan = document.createElement("div");
dummyspan.setAttribute("id",'dummyspan');
dummyspan.style.visibility = "hidden";
html_code = '';
dummyspan.innerHTML = html_code;
objBody.appendChild(dummyspan);
}
else
{
html_code = '';
document.getElementById('dummyspan').innerHTML = html_code;
}
}
function activereception_oSize(b) { var c=0,a;for(a in b)if(b.hasOwnProperty(a))c+=1;return c };
// initiate pop-up
var activereception_newWindow = '';
if (activereception_tracking_allowed) {
activereception_addLoadEvent(activereception_startTracking);
//activereception_startTracking();
}