function move2(object, count, orient){
var c;
if ((orient=='left')&&(parseInt(e(object).style.right)<0)){
if (count>0){
clearTimeout(rightTimeout);
c=parseInt(e(object).style.right)+300;
e(object).style.right=c+'px';
count=count-25;
func="move2('"+object+"','"+count+"','left');";
leftTimeout=window.setTimeout(func,1);
}}
if (orient=='right'){
if (count>0){
clearTimeout(leftTimeout);
c=parseInt(e(object).style.right)-300;
e(object).style.right=c+'px';
count=count-25;
func="move2('"+object+"','"+count+"','right');";
rightTimeout=window.setTimeout(func,1);
}}}
function VhelpPanel(container){


this.onEvent=function(ev){

}
this.namePanel=getWordLang('buttonHelp');
this.container=container;
this.reNamePanel = function (newname) {
 e('namePanel').innerHTML=newname;
}
this.HidePanel = function (){
	appEvents.dispatchEvent('hideHelpPanel','hideHelpPanel');	
	hidePanel("helpPanel");
	
	}

this.help=function(param){
if(e('namePanel').innerHTML==getWordLang('buttonHistory')){
this.HidePanel();
}
switch (param) {
case 'Смена пользователя':
case 'Баланс':
case 'Показать все трекеры':
case 'Начать слежение':
case 'Старт':
        this.reNamePanel('Помощь: Старт');
        this.writeText('<iframe src="/help/work.html" class="framehelp" frameborder="0" ALLOWTRANSPARENCY="true"/>');
break;
case 'Контроль':
        this.reNamePanel('Помощь: Контроль');
        this.writeText('<iframe src="/help/control.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;

case 'Настройки': 
        this.reNamePanel('Помощь: Настройки');
        this.writeText('<iframe src="/help/settings.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;


case 'История':
        this.reNamePanel('Помощь: История');
        this.writeText('<iframe src="/help/history.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;

case 'Отображение на сайте':
        this.reNamePanel('Помощь: Отображение на сайте');
        this.writeText('<iframe src="/help/display.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;

case 'События on-line':
        this.reNamePanel('Помощь: События on-line');
        this.writeText('<iframe src="/help/events.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
case 'Добавить трекер':
        this.reNamePanel('Помощь: Добавить трекер');
        this.writeText('<iframe src="/help/new.html" class="framehelp" frameborder="0" ALLOWTRANSPARENCY="true"/>');
break;
case 'Редактировать трекер':
        this.reNamePanel('Помощь: Редактировать трекер');
        this.writeText('<iframe src="/help/edit.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
case 'Удалить трекер':
        this.reNamePanel('Помощь: Удалить трекер');
        this.writeText('<iframe src="/help/delete.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
case 'Оповещения о событиях':
        this.reNamePanel('Помощь: Оповещения о событиях');
        this.writeText('<iframe src="/help/signalsEvent.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;

case 'Ежедневные отчеты':
        this.reNamePanel('Помощь: Ежедневные отчеты');
        this.writeText('<iframe src="/help/everyDayReport.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
case 'Контрольные точки':
        this.reNamePanel('Помощь: точки');
        this.writeText('<iframe src="/help/kt.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
case 'Контрольные маршруты':
        this.reNamePanel('Помощь: маршруты');
        this.writeText('<iframe src="/help/m.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
case 'Контрольные зоны':
        this.reNamePanel('Помощь: зоны');
        this.writeText('<iframe src="/help/zk.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
case 'Посмотреть историю':
        this.reNamePanel('Помощь: Посмотреть историю');
        this.writeText('<iframe src="/help/showHistory.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
case 'Отобразить маршрут':
        //this.reNamePanel('Помощь: Отобразить маршрут');
        //this.writeText('<iframe src="/help/showRoute.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
case 'Show route':
        //this.reNamePanel('Помощь: Отобразить маршрут');
        //this.writeText('<iframe src="/help/showRoute.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
break;
default:
this.reNamePanel(getWordLang('buttonHelp'));
this.writeText('<iframe src="'+getWordLang('urlempty')+'" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');
        }
/*if(param=='работа'){
this.reNamePanel('Помощь: Работа');
this.writeText('<iframe src="/help/work.html" class="frametrackList" frameborder="0" />');
}else{
this.reNamePanel('Помощь');
this.writeText('Данных нет');
}*/

}

this.ShowPanel = function (){showPanel("helpPanel");}
this.createPanel = function (container) {
this.MainTable= document.createElement("table");
this.MainTable.insertRow(0);
this.MainTable.rows[0].insertCell(0);
this.MainTable.insertRow(1);
this.MainTable.rows[1].insertCell(0);
this.MainTable.style.position="absolute";
this.MainTable.style.width="90%";
this.MainTable.style.height="85%";
this.MainTable.style.top="0";
this.MainTable.style.right="0";
this.NamePanelDiv=document.createElement("div");
this.NamePanelDiv.className="dpt1";
this.NamePanelDiv.id="namePanel";
this.NamePanelDiv.innerHTML=this.namePanel;
this.MainTable.rows[0].cells[0].appendChild(this.NamePanelDiv);
//this.MainTable.rows[0].cells[0].appendChild(this.krest);


this.MainTable.rows[0].cells[0].className="wpt1";
this.MainTable.rows[0].cells[0].id="namePanel1";
this.MainTable.rows[0].cells[0].onmouseover=function()
	 { 
		 if(this.className=="wpt1")
		 {
		 this.className="hwpt1";
		 }
	 } 
this.MainTable.rows[0].cells[0].onmouseout=function()
	 {
		 if(this.className=="hwpt1")
		 {
		 this.className="wpt1";
		 }
	  } 
this.MainTable.rows[0].cells[0].onclick=this.HidePanel;
this.MainTable.rows[1].cells[0].style.textAlign='left';
this.MainTable.rows[1].cells[0].style.verticalAlign='top';
this.MainTable.rows[1].cells[0].style.height='95%';
this.divcontent= document.createElement("div");
if(isFF){
   var h=(window.innerHeight/2)-20;
   h=h+'px';
  }else{var h='100%';}
this.divcontent.style.height=h;
this.divcontent.style.width='100%';
this.divcontent.style.overflow='auto';

this.MainTable.rows[1].cells[0].appendChild(this.divcontent);
this.MainTable.style.background="url('img/traspatenrfon.png')";
this.container.appendChild(this.MainTable);
this.writeText = function (text){
this.MainTable.rows[1].cells[0].firstChild.innerHTML=text;
}

this.writeText('<iframe src="/help/start.html" class="framehelp" frameborder="0"  ALLOWTRANSPARENCY="true"/>');

}}