var Scrolling_Content;
var Actual_Scroll = 1;
var panel_Scroll;
var panel_Meet;
var Defil_Middle = 1;
var Defil_Max = 5;
var panel_Awards;
var panel_Products;

var OV1; var OV2; var OV3;

var PR_1; var PR_2; var PR_3; var PR_4;

var Index_Anim_Rond = 1;
var Timer_Show_Anim_Rond;

var Timer_Wait;

if (ie5) document.write ('<link rel="stylesheet" type="text/css" href="/styles/IE.css"	rel="stylesheet" title="UserStyle">');
else document.write ('<link rel="stylesheet" type="text/css" href="/styles/FF.css"	rel="stylesheet" title="UserStyle">')

Save_Referrer(document.referrer);

var Timer_Display_Img = null;
var GLB_VDO_WIDTH;
var GLB_DISPLAYED;
var old_top_xmedia ;
var old_obj_xmedia = null;
var Old_Company_Part;
var Number_Of_Page_Product = 0;
var Current_Page = 0;
var scrollDiv;
var Over_Scroll = false;
var Panel_Stopped=false;
var Over_Scroll = false;
var open_P_X;
var Timer_Mappe;
var Type_Mappe = true;
var flash_ended = false;
var sc14 = new Image(); var logo = ""; var bgImage = new Image();

var ref = document.location.href; ref = ref.toLowerCase();
if (ref.indexOf("asten") != -1) 
{
sc14.src = "/img/Asten.gif";
logo = "/img/Top_Anim_Asten.gif";
}
else
{
sc14.src = "/img/BVocalcom.gif";
logo = "/img/Top_Anim.gif";
}

function Show_Anim_Rond(fct,evt) {
if (!browserPngSupport) {
if (fct) eval(fct);
return;
}

if (Index_Anim_Rond!=1) return
Index_Anim_Rond = 1;
var obj = document.getElementById("Anim_Rond");
obj.style.display='';

if (evt) {
obj.style.left = evt.clientX-21;
obj.style.top = evt.clientY-21;
}
else {
obj.style.left = window.event.clientX-21;
obj.style.top = window.event.clientY-21;
}

Tick_Show_Anim_Rond(obj,fct);
}


function Tick_Show_Anim_Rond(obj,fct) {
obj.className = "Anim_Rond_" + Index_Anim_Rond;
Index_Anim_Rond += 1;
if (Index_Anim_Rond<7) {
Timer_Show_Anim_Rond = setTimeout(function() {Tick_Show_Anim_Rond(obj,fct);},(Index_Anim_Rond*2));
}
else {
if (fct) eval(fct);
Index_Anim_Rond = 1;
obj.style.display='none';
}
}


function Show_Info_Show(n) {
if (!loaded) return;
if (n==0)  {
document.getElementById("icon_1").style.display="";
if (document.getElementById("icon_2")) document.getElementById("icon_2").style.display="none";
if (document.getElementById("icon_3")) document.getElementById("icon_3").style.display="none";
panel_Meet.Display(VoIP_Call_Center_Software("Upcoming Events"));
panel_Meet.ScrollPause();
}
else {
document.getElementById("icon_1").style.display="none";
if (document.getElementById("icon_2")) document.getElementById("icon_2").style.display="none";
if (document.getElementById("icon_3")) document.getElementById("icon_3").style.display="none";
document.getElementById("icon_" + n).style.display="" ;

var Array_Event_Content = new Array();
Array_Event_Content = Array_Event[n]; 

panel_Meet.Display(Array_Event_Content['Text']);
panel_Meet.ScrollPause();
setTimeout('panel_Meet.ScrollResume();',1000);
}
}

function Display_Meteo() {
var FrameMeteo = document.getElementById("Frame_Meteo").contentWindow;
for (var i=1; i<10 ; i++) {
if (FrameMeteo.document.getElementById("meteo"+i)) {
t = FrameMeteo.document.getElementById("meteo"+i).innerHTML.toUpperCase();
tN = FrameMeteo.document.getElementById("meteo"+i).innerHTML;
d = t.indexOf("<A");f = t.indexOf(">",d);f1 = t.indexOf("</A>",f);
var V = tN.substr(f+1,f1-f-1);
document.getElementById("Meteo_City_"+i).innerHTML = V;
d = t.indexOf("<A",f1);f = t.indexOf(">",d);f1 = t.indexOf("</A>",f);
d = t.indexOf("<A",f1);f = t.indexOf(">",d);f1 = t.indexOf("</A>",f);
var m = tN.substr(f+1,f1-f-1);
document.getElementById("Meteo_Sky_"+i).innerHTML = m;
d = t.indexOf("<A",f1);f = t.indexOf(">",d);f1 = t.indexOf("</A>",f);
document.getElementById("Meteo_Temp_"+i).innerHTML =  tN.substr(f+1,f1-f-1);
}
else { break; }
}
}

function affdate() {

aujourdhui = new Date();
var aujourdhuiDay =  aujourdhui.getDate()  ; if (aujourdhuiDay<10) aujourdhuiDay='0' + aujourdhuiDay;
var aujourdhuiMonth=  aujourdhui.getMonth() + 1 ; if (aujourdhuiMonth<10) aujourdhuiMonth='0' + aujourdhuiMonth;
var aujourdhuiYear =  aujourdhui.getYear()  ;
if (!ie5) aujourdhuiYear += 1900;
var aujourdhuiHours =  aujourdhui.getHours()  ; if (aujourdhuiHours<10) aujourdhuiHours='0' + aujourdhuiHours;
var aujourdhuiMinute =  aujourdhui.getMinutes() ; if (aujourdhuiMinute<10) aujourdhuiMinute='0' + aujourdhuiMinute;
var aujourdhuiSecond =  aujourdhui.getSeconds() ; if (aujourdhuiSecond<10) aujourdhuiSecond='0' + aujourdhuiSecond;

if (Culture=='EN') document.getElementById("placeforaffdate").innerHTML = aujourdhuiMonth + '-' + aujourdhuiDay + '-' + aujourdhuiYear + "<br>" + aujourdhuiHours + ':' + aujourdhuiMinute + ':' + aujourdhuiSecond ;
else document.getElementById("placeforaffdate").innerHTML = aujourdhuiDay + '/' + aujourdhuiMonth + '/' + aujourdhuiYear + "<br>" + aujourdhuiHours + ':' + aujourdhuiMinute + ':' + aujourdhuiSecond ;

setTimeout(function () {affdate();},1000);
}

var B_Client_Area = false;

function Show_Client_Area() {
var obj = document.getElementById("Client_Area");
if(B_Client_Area)  {
obj.style.display='none';
document.getElementById("Open_Client").src = "../img/open.gif";
}
else {
obj.style.display='';
document.getElementById("Open_Client").src = "../img/close.gif";
}
B_Client_Area = !B_Client_Area;
}


function getAlphaImgStr(path, width, height, handlerFor, cursor, id, onclick, swapImg) {
var arrayResult = new Array();
if (!browserPngSupport) {
arrayResult.push("<div style=\"width:"); arrayResult.push(width);
arrayResult.push(";height:"); arrayResult.push(height);
arrayResult.push(";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale enabled=true src='"); arrayResult.push(path); arrayResult.push("');");
arrayResult.push("\"></div>");
}
else {
arrayResult.push("<img src=\""); arrayResult.push(path); arrayResult.push("\"");
arrayResult.push(" style=\"width:"); arrayResult.push(width); arrayResult.push(";height:"); arrayResult.push(height);
arrayResult.push(";\">");
}
return arrayResult.join("");
}

___gbArrayMiddleDiv = new Array();

function AddMiddleDiv(div, position, topMinimum) {
if (typeof(div) != "string") div = div.id;
var exist = false;
for (var i = 0; i < ___gbArrayMiddleDiv.length; i++) {
if (___gbArrayMiddleDiv[i].id == div) {
exist = true;
break;
}
}

if (!exist) {
var obj = new Object(); obj.id = div;
obj.position = position;
obj.miniTop = topMinimum;
___gbArrayMiddleDiv.push(obj);
}

if (typeof(window.onscroll) != "function") window.onscroll = OnBodyScroll;
OnBodyScroll();
}


function OnBodyScroll() {
for (var i = 0; i < ___gbArrayMiddleDiv.length; i++) {
var div = document.getElementById(___gbArrayMiddleDiv[i].id);
var top = 0;
if (___gbArrayMiddleDiv[i].position == "top") top = document.body.scrollTop;
else if (___gbArrayMiddleDiv[i].position == "bottom") top = (document.body.clientHeight - div.clientHeight) + document.body.scrollTop;
else top = ((document.body.clientHeight - div.clientHeight) / 2) + document.body.scrollTop;

if (top < ___gbArrayMiddleDiv[i].miniTop) div.style.display = "none";
else { div.style.top = top; div.style.display = ""; }
}
}

function Alert(message) {
var path_to_image = "";
var z_index_needed = 60010;	

if (!document.getElementById("DisplayAlertDiv"))  {
var Div = document.createElement("div");
Div.style.position = 'absolute';
Div.id = 'DisplayAlertDiv';
Div.style.zIndex = z_index_needed;
Div.style.position ='absolute';
Div.style.width = '380pt';
Div.style.height = '50pt';
Div.className= 'MovePopup';

var DomMainTable = document.createElement("table");
DomMainTable.style.width = '100%';
DomMainTable.style.height = '100%';
DomMainTable.cellPadding= 0;
DomMainTable.cellSpacing= 0;
DomMainTable.style.backgroundColor= "black";
var tr = DomMainTable.insertRow(0);
tr.style.height = '18px';
var td = tr.insertCell(0);
td.style.width = '1px';
td.innerHTML = '<IMG src="' + path_to_image + '/img/img_styles/deb_popup.gif">';
var td = tr.insertCell(1);
td.style.paddingLeft  = '3px';
td.style.width= '100%';
td.style.height= '18px';
td.style.background = "url('" + path_to_image + "/img/img_styles/Fond_Haut_Popup.gif')  repeat";
td.noWrap= true;
td.align= 'left';
td.noBreak= true;
td.className= 'MovePopup';
td.handlefor= 'DisplayAlertDiv';
td.className='Menu_Pop';
td.innerHTML= '<b> </b>';
var td = tr.insertCell(2);
td.style.width= '18px';
td.style.height= '16px';
td.style.cursor= 'hand';
td.innerHTML= '<IMG src="' + path_to_image + '/img/img_styles/Close_Popup.gif">';
td.onclick= function (e) {
document.body.removeChild(document.getElementById('DisplayIframeAlertDiv'));
document.body.removeChild(document.getElementById('DisplayAlertDiv'));
};

var tr = DomMainTable.insertRow(1);
var td = tr.insertCell(0);
td.style.width = '100%';
td.style.height = '100%';
td.className= 'Main_Popup';
td.style.borderRight= '#848C94 1px solid';
td.style.borderLeft= '#848C94 1px solid';
td.colSpan= 3;
td.align= 'center';
td.vAlign= 'middle';
td.noWrap= true;
var cont= '<TABLE border=0 width=100% cellpadding=4 border=0><TR><td width=36 valign=middle><Img src="/img/img_styles/Alert.gif"></td><TD width=100% valign=middle style="color:#FF7F31;font-family:verdana,tahoma;font-size:9pt">' + message + '</TD>';
cont += '<td valign=middle align=right><A href="#" onclick="document.body.removeChild(document.getElementById(\'DisplayIframeAlertDiv\'));document.body.removeChild(document.getElementById(\'DisplayAlertDiv\'));" class="link_OK2">OK</A>&nbsp;&nbsp;</td></tr></TABLE>';
td.innerHTML= cont; 

Div.appendChild(DomMainTable);
document.body.appendChild(Div);

var Iframe = document.createElement("iframe");
Iframe.style.position = 'absolute';
Iframe.id = 'DisplayIframeAlertDiv';
Iframe.style.zIndex = z_index_needed-1;
Iframe.frameBorder= 0;
Iframe.border= 0;
Iframe.src= 'blank_black.htm';
Iframe.width = "100%";
Iframe.height = "100%";
Iframe.style.top= '0px';
Iframe.style.left= '0px';
Iframe.style.filter = "alpha(opacity=50)";
Iframe.style.opacity = "0.5";
Iframe.style.KhtmlOpacity = "0.5";
Iframe.style.MozOpacity = "0.5";
document.body.appendChild(Iframe);
}

var adiv = document.getElementById("DisplayAlertDiv");
var l = (document.body.clientWidth - adiv.clientWidth) / 2;
var t = (document.body.clientHeight - adiv.clientHeight) / 2;
adiv.style.top = t;
adiv.style.left = l;
}

var w_popup = 482; var h_popup = 534; var l_popup = 285; var t_popup = 18;

var From_T= 215;
var To_T= 97;
var Step_Awards = (From_T-To_T)/20;
var timer_awards;
var Actual_Top;
var Awards_Open = false;
var lOpener = 0;
var Working_Awards = false;

function PopupAwards(id,open) {
if (!loaded) return;
if (Working_Awards) return;

var _aw = document.getElementById("Bg_Awards");
var _atd = document.getElementById("Td_Awards");
if (id==0 && !open) {
_aw.style.display='none';
_aw.style.height = '0px';
_aw.style.top    = From_T;
Awards_Open=false;
_atd.innerHTML = "";
_atd.style.display='none';
panel_Awards.Display(' ' + VoIP_Call_Center_Software("Partners"));
Working_Awards=false;
lOpener = 0;
_aw.style.display='';
return;
}

if (!Awards_Open && !open) return;
else if (id==lOpener && open) return;
else if (id!=lOpener && !open) return;

Working_Awards = true;

var SA; var End;
var dest_T = _aw;
var dest_H = _aw;

if (open) {
lOpener = id;
Actual_Top = From_T; 
SA=-Step_Awards; 
End=To_T; 
}
else {
dest_H.style.display='none';
dest_H.style.height = '0px';
dest_T.style.top    = From_T;
Awards_Open=false;
_atd.innerHTML = "";
_atd.style.display='none';
panel_Awards.Display(' ' + VoIP_Call_Center_Software("Partners"));

Working_Awards=false;
lOpener = 0;
dest_H.style.display='';
return;
}

var H = "129";

if (open)  {
panel_Awards.Display(' '  + document.getElementById("AWARD_Text_Part1_" + id).innerHTML);
_atd.style.lineHeight = "1.5em"
_atd.innerHTML = document.getElementById("AWARD_Text_Part2_"+id).innerHTML;
_atd.style.display='';
_atd.style.height = '116px';
}
else _atd.style.display='none';

Timer_Awards_FCT(dest_T,dest_H,Actual_Top,H,SA,End,id); 
}


function Timer_Awards_FCT(obj_T,obj_H,T,H,SE,E,i) {
var New_H = H - SE;
var New_T = T + SE;

if (New_H<0) obj_H.style.height = '0px'; else obj_H.style.height = New_H;

obj_T.style.top = New_T;

if (Number(New_T)<=E && SE<0) {
Awards_Open=true;
lOpener = i;
Working_Awards=false;
obj_T.style.top = To_T;
return;
}

if (Number(New_T)>=E && SE>0) {
obj_H.style.height = '0px';
obj_T.style.top    = From_T;
Awards_Open=false;
document.getElementById("Td_Awards").innerHTML = "";
document.getElementById("Td_Awards").style.display='none';

panel_Awards.Display(' ' + VoIP_Call_Center_Software("Partners"));
Working_Awards=false;
lOpener = 0;
return;
}

timer_contact = setTimeout(function() { Timer_Awards_FCT(obj_T,obj_H,New_T,New_H,SE,E,i); }, 1);
}

function Create_Small_Menu(tm,im,w,h) {
var obj = document.createElement("div");
obj.id = 'Small_Menu';
obj.style.left = '730px'
obj.style.position = "absolute";
obj.style.verticalAlign = 'bottom';
obj.innerHTML = getAlphaImgStr(im, w, h) ;
var table = document.createElement("table");
table.cellPadding = 0; table.cellSpacing = 0;
table.style.verticalAlign = "bottom";
table.style.marginTop = '123px'; table.style.marginLeft = '25px';
table.style.position = "absolute"; 
table.height = '68px';
table.style.top="1px"; table.style.left ="1px";
table.border=0;
var tr = table.insertRow(-1);
var td = tr.insertCell(-1);
td.style.height = "24px";
td.innerHTML = "<a class=Link_SmallMenuT href='#TOP'>" + VoIP_Call_Center_Software("Top page") + "</a>";
var tr = table.insertRow(-1);
var td = tr.insertCell(-1);
td.style.height = "24px";
td.innerHTML = "<a class=Link_SmallMenuP href='javascript:history.back()'>" + VoIP_Call_Center_Software("Back") +  "</a>";
var tr = table.insertRow(-1);
var td = tr.insertCell(-1);
td.style.height = "24px";
td.innerHTML = "<a class=Link_SmallMenuH href='/'>" + VoIP_Call_Center_Software("Home Page") +  "</a>";
obj.appendChild(table);
var div = document.createElement('div')
div.className = 'clearer';
div.innerHTML = '&nbsp;&nbsp;'
obj.appendChild(div);
document.getElementById("main").appendChild(obj);
AddMiddleDiv("Small_Menu", "middle", tm);
}

function Create_Small_Menu_Standard(tm,im,w,h) {
var obj = document.createElement("div");
obj.id = 'Small_Menu';
obj.style.left = '730px'
obj.style.position = "absolute";
obj.style.verticalAlign = 'bottom';
obj.innerHTML	 = getAlphaImgStr(im, w, h) ;
var table = document.createElement("table");
table.cellPadding = 0; table.cellSpacing = 0;
table.style.verticalAlign = "bottom";
table.style.marginTop = '10px'
table.style.marginLeft = '15px'
table.style.position = "absolute"; 
table.height = '68px';
table.style.top="1px"; table.style.left ="1px";
table.border=0;
var tr = table.insertRow(-1);
var td = tr.insertCell(-1);
td.style.height = "24px";
td.innerHTML = "<a class=Link_SmallMenuT href='#TOP'>" + VoIP_Call_Center_Software("Top page") + "</a>";
var tr = table.insertRow(-1);
var td = tr.insertCell(-1);
td.style.height = "24px";
td.innerHTML = "<a class=Link_SmallMenuP href='javascript:history.back()'>" + VoIP_Call_Center_Software("Back") +  "</a>";
var tr = table.insertRow(-1);
var td = tr.insertCell(-1);
td.style.height = "24px";
td.innerHTML = "<a class=Link_SmallMenuH href='/'>" + VoIP_Call_Center_Software("Home Page") +  "</a>";
obj.appendChild(table);
var div = document.createElement('div')
div.className = 'clearer';
div.innerHTML = '&nbsp;&nbsp;'
obj.appendChild(div);
document.getElementById("main").appendChild(obj);
AddMiddleDiv("Small_Menu", "middle", tm);
}
