function Accordion(collapseContainers,links,statusRecipients,openedClassName)
{if(Accordion.__disableConstructor)
return;if(!statusRecipients)
statusRecipients=links;if(!openedClassName)
openedClassName='opened';this._collapseContainers=collapseContainers;this._links=links;this._statusRecipients=statusRecipients;this._openedClassName=openedClassName;if($.browser.msie)
{this._showAnimation='show';this._hideAnimation='hide';}
else
{this._showAnimation='slideDown';this._hideAnimation='slideUp';}
var this_obj=this;this._links.click(function(e)
{this_obj.showOrHide($(e.currentTarget));e.preventDefault();});}
Accordion.prototype.showOrHide=function(currentLink)
{var closeCurrent=false;try
{var currentLinkNum=this._getCurrentLinkNum(currentLink);var currentContent=$(this._collapseContainers.get(currentLinkNum));if(currentContent.css('display')!='none')
closeCurrent=true;this._collapseContainers[this._hideAnimation]();this._statusRecipients.removeClass(this._openedClassName);if(closeCurrent)
return;var currentStatusRecipient=$(this._statusRecipients.get(currentLinkNum));if(currentContent===undefined)
throw new Error('Undefined current content');if(currentStatusRecipient===undefined)
throw new Error('Undefined current statusRecipient');}
catch(e){return;}
if(currentContent.css('display')=='none')
{currentContent[this._showAnimation]();currentStatusRecipient.addClass(this._openedClassName);}};Accordion.prototype._getCurrentLinkNum=function(currentLink)
{for(var i=0;i<this._links.length;i++)
{if(this._links.get(i)==currentLink.get(0))
return i;}
throw new Error('Undefined current link');};

basic={parse_number:function(value)
{if(typeof(value)!='string')
return value;return parseFloat(value.replace(/[^-\d\.,]/g,'').replace(/(.)-/g,'$1').replace(/[,\.]+/g,'.').replace(/\./,'*').replace(/\./g,'').replace(/\*/,'.').replace(/\.0*$/g,'').replace(/^(-?)0{2,}/g,'$10').replace(/^(-?)0([^0])/g,'$1$2').replace(/^(-?)\./g,'$10.'));}};

BrowserDetect.isTouchPad=function()
{return('ontouchstart'in document.documentElement)&&window.orientation!==undefined;};BrowserDetect.test=function(os,browser,versionMin,versionMax)
{if(BrowserDetect.instance==null)
BrowserDetect.instance=new BrowserDetect();return BrowserDetect.instance.test(os,browser,versionMin,versionMax);};function BrowserDetect()
{this.os=[];this.browser=[];this.browserVersion=undefined;this.detect();}
BrowserDetect.prototype.detect=function()
{this.os=this._searchString(this.dataOs)||undefined;this.browser=this._searchString(this.dataBrowser)||undefined;this.browserVersion=this._searchVersion(navigator.userAgent)||this._searchVersion(navigator.appVersion)||undefined;};BrowserDetect.prototype._searchString=function(data)
{var findEntries=[];for(var i=0;i<data.length;i++)
{var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString)
{if(dataString.indexOf(data[i].subString)!=-1)
findEntries.push(data[i].identity);}
else if(dataProp)
findEntries.push(data[i].identity);}
return findEntries;};BrowserDetect.prototype._searchVersion=function(dataString)
{var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));};BrowserDetect.prototype.test=function(os,browser,versionMin,versionMax)
{versionMin=parseFloat(versionMin)||'';versionMax=parseFloat(versionMax)||'';if(os&&!this.testOs(os))
return false;if(browser&&!this.testBrowser(browser))
return false;if((versionMin||versionMax)&&!this.testBrowserVersion(versionMin,versionMax))
return false;return true;};BrowserDetect.prototype.testOs=function(os)
{if(typeof(os)!='object')
os=[os];for(var i in this.os)
{for(var i2 in os)
{if(this.os[i]==os[i2])
return true;}}
return false;};BrowserDetect.prototype.testBrowser=function(browser)
{if(typeof(browser)!='object')
browser=[browser];for(var i in this.browser)
{for(var i2 in browser)
{if(this.browser[i]==browser[i2])
return true;}}
return false;};BrowserDetect.prototype.testBrowserVersion=function(min,max)
{if(min!=''&&this.browserVersion<min)
return false;if(max!=''&&this.browserVersion>max)
return false;return true;};BrowserDetect.prototype.dataOs=[{string:navigator.platform,subString:"Win",identity:"win"},{string:navigator.platform,subString:"Win",identity:"win2"},{string:navigator.userAgent,subString:"iPhone",identity:"ios"},{string:navigator.userAgent,subString:"iPad",identity:"ios"},{string:navigator.userAgent,subString:"Android",identity:"android"},{string:navigator.platform,subString:"Mac",identity:"mac"},{string:navigator.platform,subString:"Linux",identity:"linux"}];BrowserDetect.prototype.dataBrowser=[{string:navigator.userAgent,subString:"Firefox",identity:"firefox"},{string:navigator.userAgent,subString:"Chrome",identity:"chrome"},{string:navigator.vendor,subString:"Apple",versionSearch:"Version",identity:"safari"},{prop:window.opera,identity:"opera"},{string:navigator.vendor,subString:"KDE",identity:"konqueror"},{string:navigator.userAgent,subString:"MSIE",versionSearch:"MSIE",identity:"ie"}];

function CheckboxMatrix(table,rows_head_checkboxes,columns_head_checkboxes)
{this.table=table;this.rows_head_checkboxes=rows_head_checkboxes;this.columns_head_checkboxes=columns_head_checkboxes;var this_obj=this;$('input[type="checkbox"]:enabled',table).change(function(e){this_obj.update_relations($(e.currentTarget));});}
CheckboxMatrix.prototype.update_relations=function(checkbox)
{var cell=checkbox.closest('td, th');var is_row_head_cell=Boolean($.inArray(cell,this.rows_head_checkboxes)!=-1);var is_column_head_cell=Boolean($.inArray(cell,this.columns_head_checkboxes)!=-1);var this_obj=this;if(is_row_head_cell)
{this.foreach_row_checkboxes(checkbox,function(cur_checkbox){this_obj.update_checkbox(cur_checkbox,checkbox[0].checked);},true);}
if(is_column_head_cell)
{this.foreach_column_checkboxes(checkbox,function(cur_checkbox){this_obj.update_checkbox(cur_checkbox,checkbox[0].checked);},true);}
if(!is_row_head_cell&&!is_column_head_cell)
this.update_relation_heads(checkbox);};CheckboxMatrix.prototype.update_checkbox=function(checkbox,is_checked)
{if(is_checked)
checkbox.attr('checked','checked');else
checkbox.removeAttr('checked');checkbox.trigger('change');};CheckboxMatrix.prototype.update_relation_heads=function(checkbox)
{var this_obj=this;this.foreach_row_checkboxes(checkbox,function(cur_checkbox)
{if($.inArray(cur_checkbox[0],this_obj.rows_head_checkboxes))
{cur_checkbox.trigger('change');return false;}});this.foreach_column_checkboxes(checkbox,function(cur_checkbox)
{if($.inArray(cur_checkbox[0],this_obj.columns_head_checkboxes))
{cur_checkbox.trigger('change');return false;}});};CheckboxMatrix.prototype.foreach_row_checkboxes=function(source_checkbox,callback,is_omit_source)
{$('input[type="checkbox"]:enabled',source_checkbox.closest('tr')).each(function(i)
{if(is_omit_source&&this==source_checkbox[0])
return;var continue_foreach=callback.call(this,this,i);if(continue_foreach===false)
return false;});};CheckboxMatrix.prototype.foreach_column_checkboxes=function(source_checkbox,callback,is_omit_source)
{var cell_index=source_checkbox.closest('td, th')[0].cellIndex;for(var i in this.table.rows)
{var row=this.table.rows[i];var cell=row.cells[cell_index];var cur_checkbox=$('input[type="checkbox"]:enabled',cell);if(cur_checkbox.length==0||(is_omit_source&&cur_checkbox[0]==source_checkbox[0]))
continue;var continue_foreach=callback.call(cur_checkbox[0],cur_checkbox[0],i);if(continue_foreach===false)
break;}};

function CorrectDate(dayInputs,monthInputs,yearInputs)
{if(CorrectDate.__disableConstructor)
return;$(dayInputs).blur(function(e)
{var input=$(e.currentTarget);var day=parseInt(input.val());if(!isNaN(day)&&day>31)
input.val(31);});$(monthInputs).blur(function(e)
{var input=$(e.currentTarget);var month=parseInt(input.val());if(!isNaN(month)&&month>12)
input.val(12);});$(yearInputs).blur(function(e)
{var input=$(e.currentTarget);var year=parseInt(input.val());if(isNaN(year))
return;if(year<50)
input.val(year+2000);else if(year<=99)
input.val(year+1900);});}

function DisplayToggle()
{if(DisplayToggle.__disableConstructor)
return;}

function DropdownMatches(input,dropdown,marked_loading,request_url,min_length,keep_word_as_last)
{this.input=input;this.dropdown=dropdown;this.dropdown_list=this.dropdown.is('ul, ol')?this.dropdown:$('ul, ol',this.dropdown);this.marked_loading=marked_loading;this.request_url=request_url;this.min_length=min_length;if(this.min_length<1)
this.min_length=1;this._last_request_id=0;this._last_request_word=null;this._loading_word=null;this._last_enter_word=null;this._control_key_entered=false;this._reload_words_timer=null;this._request_delay=500;this._xml_http_request=null;if(keep_word_as_last)
this._last_request_word=this._last_enter_word=this.get_input_word();this.bind();}
DropdownMatches.prototype.bind=function()
{var this_obj=this;$(document).click(function(e)
{if(e.target!=this_obj.input[0])
{this_obj.hide_dropdown();this_obj.cancel_request();}});this.dropdown.hover(function(){this_obj.dropdown.addClass('over');this_obj.undo_item_selection()},function(){this_obj.dropdown.removeClass('over');});this.input.click(function()
{if(this_obj.get_input_word().length>=this_obj.min_length)
this_obj.show_actual_dropdown();});this.input.bind('keydown keyup',function()
{var input_word=this_obj.get_input_word();if(input_word.length<this_obj.min_length)
{this_obj.hide_dropdown();this_obj.cancel_request();}
else if(this_obj._last_enter_word==null||this_obj._last_enter_word!=input_word)
this_obj.show_actual_dropdown(true);this_obj._last_enter_word=this_obj.get_input_word();});this.input.bind('keydown',function(e)
{if(this_obj.get_input_word().length<this_obj.min_length||(e.keyCode!=38&&e.keyCode!=40&&e.keyCode!=13))
return;if(e.keyCode==13)
return!this_obj.choose_selected_item();if(!this_obj.show_dropdown())
return;if(e.keyCode==38)
this_obj.move_item_selection(true);else if(e.keyCode==40)
this_obj.move_item_selection();});$('li',this.dropdown).live('click',function(e){this_obj.choose_item($(e.currentTarget));});};DropdownMatches.prototype.reload_words=function()
{var input_word=this.get_input_word();this.cancel_request();var request_id=this._last_request_id;this._loading_word=input_word;this.mark_loading(true);var this_obj=this;this._xml_http_request=$.ajax({type:'GET',url:this.request_url(input_word),timeout:30000,dataType:'text',cache:false,complete:function()
{if(request_id!=this_obj._last_request_id)
return;this_obj._loading_word=null;this_obj.mark_loading(false);},success:function(words)
{if(request_id!=this_obj._last_request_id)
return;this_obj._last_request_word=input_word;if(words=='')
{this_obj.dropdown_list.html('');this_obj.hide_dropdown(true);return;}
this_obj.dropdown_list.html('<li>'+words.split(',').join('</li><li>')+'</li>');this_obj.show_dropdown();}});};DropdownMatches.prototype.cancel_request=function()
{if(this._reload_words_timer)
clearTimeout(this._reload_words_timer);this._last_request_id++;this._loading_word=null;this.mark_loading(false);if(this._xml_http_request)
this._xml_http_request.abort();};DropdownMatches.prototype.get_input_word=function()
{return this.input.val().replace(/[^0-9a-zà-ÿ¸¨]+/ig,'');};DropdownMatches.prototype.move_item_selection=function(to_up)
{var selected=$('li.selected',this.dropdown_list);if(selected.length==0)
{if(to_up)
$('li:last-child',this.dropdown_list).addClass('selected');else
$('li:first-child',this.dropdown_list).addClass('selected');}
else
{if(to_up)
selected.prev('li').addClass('selected');else
selected.next('li').addClass('selected');selected.removeClass('selected');}};DropdownMatches.prototype.undo_item_selection=function()
{$('li.selected',this.dropdown_list).removeClass('selected');};DropdownMatches.prototype.choose_selected_item=function()
{var item=$('li.selected',this.dropdown_list);if(item.length>0)
{this.choose_item(item);this.undo_item_selection();}
return Boolean(item.length);};DropdownMatches.prototype.choose_item=function(item)
{this.cancel_request();this.input.val(item.text());this.hide_dropdown(true);this._last_request_word=this._last_enter_word=this.get_input_word();};DropdownMatches.prototype.show_actual_dropdown=function(with_reload_delay)
{var input_word=this.get_input_word();this.cancel_request();if(this._last_request_word!=null&&this._last_request_word==input_word)
this.show_dropdown();else if(this._loading_word!=input_word||this._loading_word==null)
{if(with_reload_delay)
{var this_obj=this;this._reload_words_timer=setTimeout(function(){this_obj.reload_words();},this._request_delay);}
else
this.reload_words();}};DropdownMatches.prototype.show_dropdown=function()
{if($('li',this.dropdown_list).length>0)
{this.dropdown.show();return true;}
else
return false;};DropdownMatches.prototype.hide_dropdown=function(force)
{if(force||!this.dropdown.hasClass('over'))
this.dropdown.hide();};DropdownMatches.prototype.mark_loading=function(is_loading_begin)
{if(is_loading_begin)
this.marked_loading.addClass('loading');else
this.marked_loading.removeClass('loading');};

form_active={checkbox_matrix:null,walk_inputs:null};form_active.checkbox_matrix=function(css)
{this.css=css;this.target=$(this.css.checkbox_matrix_in_global);var this_obj=this;$(this_obj.css.metall_filter_row_checkbox_tags,this_obj.target).change(function(e){this_obj.check_head_column(e.target||e.srcElement);});$(this_obj.css.metall_filter_column_checkbox_tags,this_obj.target).change(function(e){this_obj.check_head_row(e.target||e.srcElement);});$(this_obj.css.metall_filter_not_head_checkbox_tags,this_obj.target).change(function(e)
{this_obj.check_not_head_column(e.target||e.srcElement);this_obj.check_not_head_row(e.target||e.srcElement);this_obj.check_main_checkbox(e.target||e.srcElement);}).trigger('change');};form_active.checkbox_matrix.prototype.check_head_column=function(target)
{var column_checkbox=this._get_column_checkbox(target);if(this.css.is_main_checkbox(target))
{if($(target).attr('checked'))
column_checkbox.head.attr('checked','checked');else
column_checkbox.head.removeAttr('checked');column_checkbox.head.each(function(i)
{if(i>0)
$(this).trigger('change');});}
else
{if($(target).attr('checked'))
column_checkbox.not_head.attr('checked','checked');else
column_checkbox.not_head.removeAttr('checked');column_checkbox.not_head.trigger('change');}};form_active.checkbox_matrix.prototype.check_head_row=function(target)
{var row_checkbox=this._get_row_checkbox(target);if($(target).attr('checked'))
row_checkbox.not_head.attr('checked','checked');else
row_checkbox.not_head.removeAttr('checked');row_checkbox.not_head.trigger('change');};form_active.checkbox_matrix.prototype.check_not_head_column=function(target)
{var column_checkbox=this._get_column_checkbox(target);var all_count=column_checkbox.not_head.length;var checked_count=column_checkbox.not_head.filter(':checked').length;if(checked_count==all_count)
column_checkbox.head.attr('checked','checked');else if(checked_count<all_count)
column_checkbox.head.removeAttr('checked');};form_active.checkbox_matrix.prototype.check_not_head_row=function(target)
{var row_checkbox=this._get_row_checkbox(target);var all_count=row_checkbox.not_head.length;var checked_count=row_checkbox.not_head.filter(':checked').length;if(checked_count==all_count)
row_checkbox.head.attr('checked','checked');else if(checked_count<all_count)
row_checkbox.head.removeAttr('checked');};form_active.checkbox_matrix.prototype.check_main_checkbox=function(target)
{var table=$(target).closest(this.css.table_from_inside);var head_checkbox=$(this.css.head_checkbox_in_table,table);var main_checkbox=$(this.css.main_checkbox_in_table,table);var all_count=head_checkbox.length;var checked_count=head_checkbox.filter(':checked').length;if(checked_count==all_count)
main_checkbox.attr('checked','checked');else
main_checkbox.removeAttr('checked');};form_active.checkbox_matrix.prototype._get_row_checkbox=function(target)
{var row=$(target).closest(this.css.row_from_checkbox);var all_not_head_checkbox=$(this.css.not_head_cells_checkbox_tags_in_row,row);var head_checkbox=$(this.css.head_cell_checkbox_from_row,row);return{'head':head_checkbox,'not_head':all_not_head_checkbox};};form_active.checkbox_matrix.prototype._get_column_checkbox=function(target)
{var cell=$(target).closest(this.css.cell_from_checkbox);var col_num=cell.get(0).cellIndex;var table=cell.closest(this.css.table_from_inside);var rows=$(this.css.rows_in_table,table);var all_checkbox=$(this.css.checkbox_tags_in_column_rows.replace(new RegExp('{COL_NUM}','g'),col_num),rows);var all_not_head_checkbox=[];var head_checkbox=[];var this_obj=this;all_checkbox.each(function()
{var checkbox=this;if(this_obj.css.is_checkbox_in_head_cell(checkbox))
head_checkbox.push(checkbox);else
all_not_head_checkbox.push(checkbox);});all_not_head_checkbox=$(all_not_head_checkbox);head_checkbox=$(head_checkbox);return{'head':head_checkbox,'not_head':all_not_head_checkbox};};form_active.walk_inputs=function(css)
{this.css=css;this.target=$(this.css.inputs_wrapper_in_global);var this_obj=this;var inputs=$(this.css.input_tag,this.target);var events='keydown keyup change';if($.browser.opera)
events+=' keypress';inputs.bind(events,function(e){return this_obj.jump(e);});inputs.click(function(){$(this).select();});};form_active.walk_inputs.prototype.jump=function(e)
{var input=$(e.target||e.srcElement);var key=e.keyCode;var event_type=e.type;var key_char=String.fromCharCode(key);var maxlength=input.attr('maxlength')||1;if(key!=8&&key!=9&&key!=16&&key!=46&&input.val().length>=maxlength&&(event_type=='keyup'||event_type=='change'))
{if(((key>=96&&key<=105)||key_char.search(/^\d+$/)!=-1)&&event_type=='keyup')
{var next_input=input.next(this.css.input_tag);input.blur();next_input.focus();next_input.select();}}
if(key==8&&event_type=='keydown'&&input.val()=='')
{var prev_input=input.prev(this.css.input_tag);input.blur();prev_input.focus();prev_input.select();return false;}
if(key!=13&&key!=8&&key!=9&&key!=16&&key!=46&&!(key>=37&&key<=40)&&!(key>=112&&key<=123)&&!e.ctrlKey&&!e.altKey&&(event_type=='keydown'||event_type=='keypress'))
{if((key<96||key>105)&&key_char.search(/^\d+$/)==-1)
return false;}
return true;};

function FramePage(frame,url,settings)
{if(FramePage.__disableConstructor)
return;if(!frame)
throw new Error('Frame not set');this._frame=frame;this._url=url;this._settings=$.extend(true,{initialPageLabel:'_history_start',enableIsolationMode:false},settings);this._needSaveLastHistoryUrl=1;this._lastHistoryUrl=null;this._backDisabled=false;this._nextDisabled=false;this._currentNode=null;if(this._url&&!this._settings.enableIsolationMode)
this._frame.src=this.getInitialPageUrl();else
this._frame.src=this._url;if(this._settings.enableIsolationMode)
{if(this._settings.remapUrlCallback)
throw Error('"remapUrlCallback" in "FramePage" settings deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');if(this._settings.onUnloadByLink)
throw Error('"onUnloadByLink" in "FramePage" settings deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');if(this._settings.onBack)
throw Error('"onBack" in "FramePage" settings deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');if(this._settings.onBackAfter)
throw Error('"onBackAfter" in "FramePage" settings deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');if(this._settings.onNext)
throw Error('"onNext" in "FramePage" settings deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');if(this._settings.onNextAfter)
throw Error('"onNextAfter" in "FramePage" settings deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');}
if(this._settings.callStartLoadEventByCookie)
{var thisObj=this;setTimeout(function(){if($.cookie(thisObj._settings.callStartLoadEventByCookie))
{$.cookie(thisObj._settings.callStartLoadEventByCookie,null,{path:'/'});thisObj._callEvent('onStartLoad');}
if(thisObj.isShow())
setTimeout(arguments.callee,300);},300);}
this._callEvent('onStartLoad');var thisObj=this;$(this._frame).load(function(){thisObj._preparePage();thisObj._callEvent('onStopLoad');});}
FramePage.prototype.isShow=function()
{throw new Error('Implement FramePage.isShow() method');};FramePage.prototype.getInitialPageUrl=function()
{if(this._settings.enableIsolationMode)
throw Error('FramePage.getInitialPageUrl() deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');var url=this._callWithUrl(this._url,this._settings.remapUrlCallback);var label=this._settings.initialPageLabel;if(url.indexOf(label)==-1&&label!='')
{if(url.indexOf('?')==-1)
url+='?';else
url+='&';url+=label;}
return url;};FramePage.prototype.getFrame=function()
{return this._frame;};FramePage.prototype.getFrameWindow=function()
{if(this._settings.enableIsolationMode)
throw Error('FramePage.getFrameWindow() deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');return this._frame.contentWindow;};FramePage.prototype.isHistorySupported=function()
{return!Boolean(this._settings.enableIsolationMode);};FramePage.prototype.isCanBack=function()
{if(this._settings.enableIsolationMode)
throw Error('FramePage.isCanBack() deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');return(this._frame.contentWindow.location.search.indexOf(this._settings.initialPageLabel)==-1);};FramePage.prototype.isCanNext=function()
{if(this._settings.enableIsolationMode)
throw Error('FramePage.isCanNext() deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');return(this._frame.contentWindow.document.URL!=this._lastHistoryUrl);};FramePage.prototype.back=function()
{if(this._settings.enableIsolationMode)
throw Error('FramePage.back() deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');if(!this._frame.contentWindow)
return false;if(!this.isCanBack()||this._backDisabled)
return false;this._backDisabled=true;this._callEvent('onStartLoad');this._callEvent('onBack');this._frame.contentWindow.history.back();this._callEvent('onBackAfter');return true;};FramePage.prototype.next=function()
{if(this._settings.enableIsolationMode)
throw Error('FramePage.next() deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');if(!this._frame.contentWindow)
return false;if(!this.isCanNext()||this._nextDisabled)
return false;this._nextDisabled=true;this._callEvent('onStartLoad');this._callEvent('onNext');this._frame.contentWindow.history.forward();this._callEvent('onNextAfter');return true;};FramePage.prototype.getCurrentNode=function()
{if(this._settings.enableIsolationMode)
throw Error('FramePage.getCurrentNode() deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');return this._currentNode;};FramePage.prototype._preparePage=function()
{if(!this._settings.enableIsolationMode)
{if(this._needSaveLastHistoryUrl)
{this._lastHistoryUrl=this._frame.contentWindow.document.URL;this._needSaveLastHistoryUrl=0;}
this._backDisabled=false;this._nextDisabled=false;this._remapPageUrls();var thisObj=this;$('a[href][target!="_blank"][target!="_top"]:not([href^="#"])',this._frame.contentWindow.document).click(function(e){thisObj._unloadByLink(e.currentTarget);});$('form[target!="_blank"][target!="_top"]:not([action^="#"])',this._frame.contentWindow.document).submit(function(e){thisObj._unloadByLink(e.currentTarget);});}};FramePage.prototype._remapPageUrls=function()
{if(this._settings.remapUrlCallback)
{var thisObj=this;$('a, form',this._frame.contentWindow.document).each(function()
{var node=this;thisObj._currentNode=node;var url=thisObj._getNodeUrl(node);if(url.indexOf('mailto:')!=0)
{var newUrl=thisObj._callWithUrl(url,thisObj._settings.remapUrlCallback);thisObj._setNodeUrl(node,newUrl);}});}};FramePage.prototype._unloadByLink=function(node)
{this._currentNode=node;this._needSaveLastHistoryUrl=1;if(this._settings.onUnloadByLink&&!this._disableEvents)
this._callWithUrl(this._getNodeUrl(node),this._settings.onUnloadByLink);return true;};FramePage.prototype._getNodeUrl=function(node)
{var url;if(node.tagName=='A')
url=node.getAttribute('href');else if(node.tagName=='FORM')
url=node.getAttribute('action');else
url='';var currentUrl=this._frame.contentWindow.document.URL;if($.browser.msie&&$.browser.version<=7&&url==currentUrl+'#')
url=url.slice(currentUrl.length);return url;};FramePage.prototype._setNodeUrl=function(node,newUrl)
{if(node.tagName=='A')
{node.setAttribute('href',newUrl);return true;}
else if(node.tagName=='FORM')
{node.setAttribute('action',newUrl);return true;}
return false;};FramePage.prototype._callWithUrl=function(url,callback)
{if(callback)
return callback(this,url);else
return url;};FramePage.prototype._callEvent=function(eventName,args)
{if(!this._settings[eventName]||this._disableEvents)
return false;args=args||[];args.unshift(this);this._settings[eventName].apply(this,args);};

ImageSlider=function(settings)
{settings=$.extend({imageWidth:100,stickStep:10,stickStartDelay:250,stickSpeed:25},settings);settings.containerElement.get(0).scrollLeft=0;this._settings=settings;this._stickActive=false;this._stickDelayTimer=null;this._stickScrollTimer=null;var thisObj=this;thisObj._settings.scrollLeftElement.mousedown(function(e)
{e.preventDefault();thisObj._handleDownPress(false);});thisObj._settings.scrollLeftElement.mouseup(function(e)
{e.preventDefault();thisObj._handleUpPress(false);});thisObj._settings.scrollLeftElement.click(function(e){e.preventDefault();});thisObj._settings.scrollRightElement.mousedown(function(e)
{e.preventDefault();thisObj._handleDownPress(true);});thisObj._settings.scrollRightElement.mouseup(function(e)
{e.preventDefault();thisObj._handleUpPress(true);});thisObj._settings.scrollRightElement.click(function(e){e.preventDefault();});};ImageSlider.prototype.scrollTo=function(leftOffset)
{this._settings.containerElement.get(0).scrollLeft=leftOffset;};ImageSlider.prototype.scrollToImage=function(imageIndex)
{var startVisibleImageIndex=this.getStartVisibleImageIndex();var endVisibleImageIndex=this.getEndVisibleImageIndex();if(imageIndex>=startVisibleImageIndex&&imageIndex<=endVisibleImageIndex)
return;if(imageIndex>endVisibleImageIndex)
this.scrollTo(imageIndex*this._settings.imageWidth-this.getFullContainerWidth());else if(imageIndex<startVisibleImageIndex)
this.scrollTo(imageIndex*this._settings.imageWidth);};ImageSlider.prototype.getStartVisibleImageIndex=function()
{return Math.ceil(this._settings.containerElement.get(0).scrollLeft/this._settings.imageWidth);};ImageSlider.prototype.getEndVisibleImageIndex=function()
{var leftOffset=this._settings.containerElement.get(0).scrollLeft+this.getFullContainerWidth();return Math.floor(leftOffset/this._settings.imageWidth);};ImageSlider.prototype.getFullContainerWidth=function()
{var containerWidth=this._settings.containerElement.outerWidth();return containerWidth-(containerWidth%this._settings.imageWidth);};ImageSlider.prototype._handleDownPress=function(toRight)
{if(this._stickActive)
return;var thisObj=this;this._stickDelayTimer=setTimeout(function(){thisObj._stickActive=true;thisObj._stickScrollTimer=setTimeout(function(){thisObj._scrollByStep(thisObj._settings.stickStep,toRight);if(thisObj._stickActive)
thisObj._stickScrollTimer=setTimeout(arguments.callee,thisObj._settings.stickSpeed);},thisObj._settings.stickSpeed);},thisObj._settings.stickStartDelay);};ImageSlider.prototype._scrollByStep=function(step,toRight)
{if(toRight)
this._settings.containerElement.get(0).scrollLeft+=step;else
this._settings.containerElement.get(0).scrollLeft-=step;};ImageSlider.prototype._handleUpPress=function(toRight)
{clearTimeout(this._stickDelayTimer);clearTimeout(this._stickScrollTimer);if(!this._stickActive)
this._doClick(toRight);else
this._stickActive=false;};ImageSlider.prototype._doClick=function(toRight)
{if(toRight)
this.openNextThumb();else
this.openPrevThumb();};ImageSlider.prototype.openPrevThumb=function()
{var selectedListItem=$('li.selected',this._settings.contentElement);var prevListItem;if(selectedListItem.is(':first-child'))
prevListItem=$('li:last-child',this._settings.contentElement);else
prevListItem=selectedListItem.prev('li');this.scrollToImage(prevListItem.index());$('a',prevListItem).click();};ImageSlider.prototype.openNextThumb=function()
{var selectedListItem=$('li.selected',this._settings.contentElement);var nextListItem;if(selectedListItem.is(':last-child'))
nextListItem=$('li:eq(0)',this._settings.contentElement);else
nextListItem=selectedListItem.next('li');this.scrollToImage(nextListItem.index());$('a',nextListItem).click();};

function InputClickSelection(inputs)
{if(InputClickSelection.__disableConstructor)
return;inputs.click(function(){$(this).select();});}

function InputConverter(inputs,fromOrCallback,to)
{if(InputConverter.__disableConstructor)
return;this._inputs=inputs;if(typeof(fromOrCallback)=='function')
this._callback=fromOrCallback;else
{this._from=fromOrCallback;this._to=to;}
var thisObj=this;var events='keyup keydown change';if($.browser.opera)
events+=' keypress';inputs.bind(events,function(e)
{var input=$(e.currentTarget);var sourceVal=input.val();var convertedVal=thisObj.convert(sourceVal);if(sourceVal!=convertedVal)
input.val(convertedVal);});}
InputConverter.prototype.convert=function(value)
{if(this._callback)
return this._callback(value);else
return this._translate(value,this._from,this._to);};InputConverter.prototype._translate=function(value,from,to)
{for(var i=0;i<from.length;i++)
{var toLastCharNum=to.length-1;var replacement=i<=toLastCharNum?to.charAt(i):to.charAt(toLastCharNum);value=value.replace(new RegExp(from.charAt(i),'g'),replacement);}
return value;};

function InputConverterMaskNum(inputs)
{if(InputConverterMaskNum.__disableConstructor)
return;InputConverterMaskNum.__super.call(this,inputs,function(value)
{value=value.toUpperCase();value=this._translate(value,'ÔÈÑÂÓÀÏ','ABCDEFG');return value;});}
tools.extendClass(InputConverterMaskNum,InputConverter);

function InputConverterToLowerCase(inputs)
{if(InputConverterToLowerCase.__disableConstructor)
return;InputConverterToLowerCase.__super.call(this,inputs,function(value){return value.toLowerCase();});}
tools.extendClass(InputConverterToLowerCase,InputConverter);

function InputConverterToUpperCase(inputs)
{if(InputConverterToUpperCase.__disableConstructor)
return;InputConverterToUpperCase.__super.call(this,inputs,function(value){return value.toUpperCase();});}
tools.extendClass(InputConverterToUpperCase,InputConverter);

function InputPlaceholder(inputElements,placeholderText,placeholderClass)
{if(InputPlaceholder.__disableConstructor)
return;this._inputElements=inputElements;this._placeholderText=placeholderText;this._placeholderClass=placeholderClass||'g_placeholder';var thisObj=this;this._inputElements.each(function(){thisObj.putPlaceholderIfEmpty($(this));});$(inputElements).focus(function(e)
{var input=$(e.currentTarget);if(input.val()==thisObj._placeholderText)
{input.val('');input.removeClass(thisObj._placeholderClass);}});$(inputElements).blur(function(e)
{thisObj.putPlaceholderIfEmpty($(e.currentTarget));});}
InputPlaceholder.prototype.putPlaceholderIfEmpty=function(input)
{if(input.val()==''||input.val()==this._placeholderText)
{input.val(this._placeholderText);input.addClass(this._placeholderClass);}};

function InputRestriction(inputs,allowedRegex,allowedKeyCodes)
{if(InputRestriction.__disableConstructor)
return;this._inputs=inputs;this._allowedRegex=allowedRegex;this._allowedKeyCodes=allowedKeyCodes;this._onSuccess=null;this._onFail=null;var this_obj=this;var events='keyup keydown change';if($.browser.opera)
events+=' keypress';inputs.bind(events,function(e){return this_obj.isValid(e);});}
InputRestriction.prototype.onSuccess=function(callback)
{if(callback)
this._onSuccess=callback;else
return this._onSuccess;};InputRestriction.prototype.callOnSuccess=function(e)
{if(this._onSuccess)
return this._onSuccess(e);else
return true;};InputRestriction.prototype.onFail=function(callback)
{if(callback)
this._onFail=callback;else
return this._onFail;};InputRestriction.prototype.callOnFail=function(e)
{if(this._onFail)
return this._onFail(e);else
return false;};InputRestriction.prototype.isValid=function(e)
{var key=e.keyCode;var eventType=e.type;var keyChar=String.fromCharCode(key);if(this._isServiceKey(key))
{return this.callOnSuccess(e);}
if($.isArray(this._allowedKeyCodes)&&$.inArray(key,this._allowedKeyCodes)!=-1)
{return this.callOnSuccess(e);}
if(keyChar.search(this._allowedRegex)!=-1)
{return this.callOnSuccess(e);}
return this.callOnFail(e);};InputRestriction.prototype._isServiceKey=function(key)
{var serviceKeyCodes=[37,38,39,40,112,113,114,115,116,117,118,119,120,121,122,123,8,9,13,16,27,33,34,35,36,45,46,19,44,144,145];if($.inArray(key,serviceKeyCodes)!=-1)
return true;else
return false;};

function InputRestrictionMaskNum(inputs)
{if(InputRestrictionMaskNum.__disableConstructor)
return;var allowedKeyCodes=[];for(var i=96;i<=105;i++)
{allowedKeyCodes.push(i);}
InputRestrictionMaskNum.__super.call(this,inputs,/^[0-9ABCDEFGÔÈÑÂÓÀÏ]+$/i,allowedKeyCodes);}
tools.extendClass(InputRestrictionMaskNum,InputRestriction);

function InputRestrictionOnlyDigits(inputs)
{if(InputRestrictionOnlyDigits.__disableConstructor)
return;var allowedKeyCodes=[];for(var i=96;i<=105;i++)
{allowedKeyCodes.push(i);}
InputRestrictionOnlyDigits.__super.call(this,inputs,/^\d+$/,allowedKeyCodes);}
tools.extendClass(InputRestrictionOnlyDigits,InputRestriction);

function InputsWalk(inputsChain,manualJumping)
{if(InputsWalk.__disableConstructor)
return;this._inputsChain=inputsChain;var this_obj=this;if(!manualJumping)
{var events='keydown keyup change';if($.browser.opera)
events+=' keypress';this._inputsChain.bind(events,function(e){return this_obj.jump(e);});}}
InputsWalk.prototype.jump=function(e)
{var currentInput=e.currentTarget;var key=e.keyCode;var eventType=e.type;if(!this._isServiceKey(key)&&(eventType=='keyup'||eventType=='change'))
this.gotoNextInput(currentInput);if(key==8&&eventType=='keydown')
{return!this.gotoPrevInput(currentInput);}
return true;};InputsWalk.prototype.getNextInput=function(currentInput)
{for(var i=0;i<this._inputsChain.length;i++)
{var input=this._inputsChain.get(i);if(input==currentInput)
{var nextIndex=i+1;var lastIndex=this._inputsChain.length-1;if(nextIndex<=lastIndex)
return this._inputsChain.get(nextIndex);break;}}
return null;};InputsWalk.prototype.getPrevInput=function(currentInput)
{for(var i=this._inputsChain.length-1;i>=0;i--)
{var input=this._inputsChain.get(i);if(input==currentInput)
{var prevIndex=i-1;if(prevIndex>=0)
return this._inputsChain.get(prevIndex);break;}}
return null;};InputsWalk.prototype.gotoPrevInput=function(currentInput)
{if(currentInput.value!='')
return false;var prevInput=this.getPrevInput(currentInput);if(prevInput)
{currentInput.blur();prevInput.focus();prevInput.select();return true;}
return false;};InputsWalk.prototype.gotoNextInput=function(currentInput)
{if(currentInput.value=='')
return false;var nextInput=this.getNextInput(currentInput);if(nextInput&&currentInput.value.length>=currentInput.maxLength)
{currentInput.blur();nextInput.focus();nextInput.select();return true;}
return false;};InputsWalk.prototype._isServiceKey=function(key)
{var serviceKeyCodes=[37,38,39,40,112,113,114,115,116,117,118,119,120,121,122,123,8,9,13,16,27,33,34,35,36,45,46,19,44,144,145];if($.inArray(key,serviceKeyCodes)!=-1)
return true;else
return false;};

function InputsWalkWithRestriction(inputsChain,inputRestriction)
{if(InputsWalkWithRestriction.__disableConstructor)
return;var inputsWalk=new InputsWalk(inputsChain,true);if(typeof(inputRestriction)=='function')
inputRestriction=new inputRestriction(inputsChain);inputRestriction.onSuccess(function(e){return inputsWalk.jump(e);});}

jQuery.callExists=function(element,context,callback)
{var wrapper=jQuery.createCallExistsWrapper(element,context,callback);wrapper();return wrapper;};

jQuery.callExistsOnReady=function(selector,context,callback)
{if(typeof(selector)!='string')
throw new Error('callExistsOnReady can accept only string as selector');var wrapper=jQuery.createCallExistsWrapper(selector,context,callback);$(function()
{wrapper();});return wrapper;};

(function($)
{function getNextSpacePos(string,start)
{var positions=[string.indexOf(" ",start),string.indexOf("\t",start),string.indexOf("\r",start),string.indexOf("\n",start),string.indexOf("\v",start),string.indexOf("\f",start)];var min=undefined;for(var i in positions)
{if(positions[i]!=-1&&(positions[i]<min||min===undefined))
min=positions[i];}
return min;}
$.fn.classPostfix=function(prefix)
{var classString=this.attr('class');var start=0;var pos;while((pos=classString.indexOf(prefix,start))!=-1)
{var prevChar=classString.charAt(pos-1);var nextChar=classString.charAt(pos+prefix.length);if(prevChar!=''&&!prevChar.match(/\s/))
{start++;continue;}
if(nextChar=='')
break;if(nextChar.match(/\s/))
{start=pos+prefix.length+1;continue;}
var postfixStart=pos+prefix.length;return classString.slice(postfixStart,getNextSpacePos(classString,postfixStart));}};})(jQuery);

(function($)
{$.fn.classPostfixClosest=function(prefix)
{var parent=this;while(parent.length)
{var postfix=parent.classPostfix(prefix);if(postfix!==undefined)
return postfix;parent=parent.parent();}};})(jQuery);

jQuery.createCallExistsWrapper=function(selectorOrElement,context,callback)
{if(callback==null&&context==null)
{callback=selectorOrElement;selectorOrElement=undefined;}
else if(callback==null)
{callback=context;context=undefined;}
var wrapper=function()
{if(!selectorOrElement)
return;var element=selectorOrElement;if(typeof(selectorOrElement)!='object'||selectorOrElement.constructor!=jQuery)
{if(context)
element=$(selectorOrElement,context);else
element=$(selectorOrElement);}
if(element.length==0)
return;callback.call(element);};return wrapper;};

(function($)
{var listeners=[];function processListeners()
{for(var i in listeners)
processUrlHandler(listeners[i].urlFragment,listeners[i].callback);}
function processUrlHandler(urlFragment,callback)
{if(urlFragment==location.hash.replace(/^\#/,''))
callback();}
function startFragmentListeningOnce()
{if(arguments.callee._started)
return;else
arguments.callee._started=true;if('onhashchange'in window&&!($.browser.msie&&parseInt($.browser.version)<=7))
{$(window).bind('hashchange',function(e){processListeners();});}
else
{var lastHash=location.hash;var interval=400;setTimeout(function(){if(lastHash!=location.hash)
{processListeners();lastHash=location.hash;}
setTimeout(arguments.callee,interval)},interval);}}
$.createFragmentHandler=function(urlFragment,callback)
{urlFragment=urlFragment.replace(/^\#/,'');listeners.push({urlFragment:urlFragment,callback:callback});processUrlHandler(urlFragment,callback);startFragmentListeningOnce();};})(jQuery);

jQuery.provide=function(objectsChain){var objectsChainArray=objectsChain.split('.');var prevObject=window;for(var i in objectsChainArray)
{var objectName=objectsChainArray[i];if(prevObject[objectName]===undefined)
prevObject[objectName]={};prevObject=prevObject[objectName];}
return prevObject;};

(function($)
{var oldHtmlStorage;$.fn.toggleHtml=function(newHtml,oldHtml)
{if(oldHtmlStorage==null)
oldHtmlStorage=new ObjectKeyStorage();return this.each(function()
{var currentHtml=$(this).html();oldHtmlStorage.setOnce(this,currentHtml);if(oldHtml==null)
oldHtml=oldHtmlStorage.get(this);$(this).html(currentHtml==oldHtml?newHtml:oldHtml);});};})(jQuery);

(function($)
{var oldTextStorage;$.fn.toggleText=function(newText,oldText)
{if(oldTextStorage==null)
oldTextStorage=new ObjectKeyStorage();return this.each(function()
{var currentText=$(this).text();oldTextStorage.setOnce(this,currentText);if(oldText==null)
oldText=oldTextStorage.get(this);$(this).text(currentText==oldText?newText:oldText);});};})(jQuery);

function Modal(settings)
{if(Modal.__disableConstructor)
return;if(Modal._htmlElementsToInstances===null)
Modal._htmlElementsToInstances=new ObjectKeyStorage();this._settings=$.extend(true,{},{autoShow:true,overlayOpacity:0.6,removeOnClose:true,align:'center',overlayTemplate:function(){return'';},dialogTemplate:function(){return'';},stopClickPropagation:false},settings);this._dialogElement=null;this._overlayElement=null;if(this._settings.autoShow)
this.show();}
Modal._htmlElementsToInstances=null;Modal.findInstance=function(htmlElement)
{return Modal._htmlElementsToInstances.get(htmlElement);};Modal.prototype.getDialogElement=function()
{return this._dialogElement;};Modal.prototype.createOnce=function()
{if(this._dialogElement)
return false;this.create();};Modal.prototype.create=function()
{this._callEvent('onCreate');this._dialogElement=$(this._settings.dialogTemplate(this._settings)).appendTo(document.body).get(0);this._overlayElement=$(this._settings.overlayTemplate(this._settings)).appendTo(document.body).get(0);$(this._overlayElement).fadeTo(10,this._settings.overlayOpacity);Modal._htmlElementsToInstances.set(this._dialogElement,this);Modal._htmlElementsToInstances.set(this._overlayElement,this);var thisObj=this;if(this._settings.closeElementSelector)
{$(this._settings.closeElementSelector,this._dialogElement).live('click',function(e)
{thisObj._callEvent('onCloseClick');thisObj.close();thisObj._callEvent('onCloseClickAfter');e.preventDefault();if(thisObj._settings.stopClickPropagation)
e.stopPropagation();});}
if(this._settings.stopClickPropagation)
{$(this._dialogElement).click(function(e){e.stopPropagation();});$(this._overlayElement).click(function(e){e.stopPropagation();});}
this._callEvent('onCreateAfter');};Modal.prototype.disableEvents=function()
{this._disableEvents=true;};Modal.prototype.enableEvents=function()
{this._disableEvents=false;};Modal.prototype.close=function()
{if(this._settings.removeOnClose)
this.remove();else
this.hide();};Modal.prototype.remove=function()
{this._callEvent('onClose');this._callEvent('onRemove');$(this._dialogElement).hide();$(this._overlayElement).hide();$(this._dialogElement).remove();$(this._overlayElement).remove();this._callEvent('onRemoveAfter');this._callEvent('onCloseAfter');};Modal.prototype.show=function()
{this.createOnce();this._callEvent('onShow');this._old_html_overflow=$('html').css('overflow');$('html').css('overflow','auto');var old_doc_height=$(document).height();$(this._overlayElement).show();$(this._dialogElement).show();this._doWidth();this._doHeight();this._doAlign();this._doVerticalAlign();if($.browser.msie&&$.browser.version<=6)
{$('select:visible').addClass('__ie6_hidden');$('select:visible').hide();}
var doc_height=$(document).height();var margin_top=this._settings.marginTop||0;if(old_doc_height<doc_height||$(this._dialogElement).outerHeight()+margin_top>doc_height)
$(this._overlayElement).css('height',doc_height+'px');this._callEvent('onShowAfter');};Modal.prototype.hide=function()
{this._callEvent('onClose');this._callEvent('onHide');$('html').css('overflow',this._old_html_overflow);if($.browser.msie&&$.browser.version<=6)
{$('select.__ie6_hidden').show();$('select.__ie6_hidden').removeClass('__ie6_hidden');}
$(this._dialogElement).hide();$(this._overlayElement).hide();this._callEvent('onHideAfter');this._callEvent('onCloseAfter');};Modal.prototype.isShow=function()
{return(this._dialogElement.style.display!='none');};Modal.prototype.setWidth=function(width)
{this._settings.width=width;this._doWidth();this._doAlign();};Modal.prototype.setMinWidth=function(width)
{this._settings.minWidth=width;this._doWidth();this._doAlign();};Modal.prototype.setMaxWidth=function(width)
{this._settings.maxWidth=width;this._doWidth();this._doAlign();};Modal.prototype._doWidth=function()
{var width=this._calculateWidth(true);if(width)
$(this._dialogElement).css('width',width+'px');};Modal.prototype._calculateWidth=function(correctMaxOverhead)
{if(!this._settings.width)
return;else
{var width=this._derefWidth(this._settings.width);if(correctMaxOverhead)
{var minWidth=this._calculateMinWidth();if(width<minWidth)
width=minWidth;var maxWidth=this._calculateMaxWidth();if(width>maxWidth)
width=maxWidth;}
return width;}};Modal.prototype._calculateMinWidth=function()
{if(!this._settings.minWidth)
return;else
return this._derefWidth(this._settings.minWidth);};Modal.prototype._calculateMaxWidth=function()
{if(!this._settings.maxWidth)
return;else
return this._derefWidth(this._settings.maxWidth);};Modal.prototype._derefWidth=function(width)
{if(typeof(width)=='string'&&width.indexOf('%')!=-1)
{var winWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;return winWidth*parseInt(width)/100
-(this._settings.marginLeft||0)-(this._settings.marginRight||0);}
else
return parseInt(width);};Modal.prototype.setHeight=function(height)
{this._settings.height=height;this._doHeight();this._doVerticalAlign();};Modal.prototype.setMinHeight=function(height)
{this._settings.minHeight=height;this._doHeight();this._doVerticalAlign();};Modal.prototype.setMaxHeight=function(height)
{this._settings.maxHeight=height;this._doHeight();this._doVerticalAlign();};Modal.prototype._doHeight=function()
{var height=this._calculateHeight(true);if(height)
$(this._dialogElement).css('height',height+'px');};Modal.prototype._calculateHeight=function(correctMaxOverhead)
{if(!this._settings.height)
return;else
{var height=this._derefHeight(this._settings.height);if(correctMaxOverhead)
{var minHeight=this._calculateMinHeight();if(height<minHeight)
height=minHeight;var maxHeight=this._calculateMaxHeight();if(height>maxHeight)
height=maxHeight;}
return height;}};Modal.prototype._calculateMinHeight=function()
{if(!this._settings.minHeight)
return;else
return this._derefHeight(this._settings.minHeight);};Modal.prototype._calculateMaxHeight=function()
{if(!this._settings.maxHeight)
return;else
return this._derefHeight(this._settings.maxHeight);};Modal.prototype._derefHeight=function(height)
{if(typeof(height)=='string'&&height.indexOf('%')!=-1)
{var winHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;return winHeight*parseInt(height)/100
-(this._settings.marginTop||0)-(this._settings.marginBottom||0);}
else
return parseInt(height);};Modal.prototype._doAlign=function()
{var winWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var marginLeft=this._settings.marginLeft||0;var marginRight=this._settings.marginRight||0;var widthOuter=$(this._dialogElement).outerWidth()+marginLeft+marginRight;if(this._settings.align=='center'&&widthOuter<winWidth)
{var y=parseInt((winWidth-widthOuter)/2)+marginLeft;$(this._dialogElement).css('left',y+'px');}
else if(this._settings.align=='right')
$(this._dialogElement).css('right',marginRight+'px');else
$(this._dialogElement).css('left',marginLeft+'px');};Modal.prototype._doVerticalAlign=function()
{var winHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var marginTop=this._settings.marginTop||0;var marginBottom=this._settings.marginBottom||0;var heightOuter=$(this._dialogElement).outerHeight()+marginTop+marginBottom;if(this._settings.verticalAlign=='center'&&heightOuter<winHeight)
{var y=parseInt((winHeight-heightOuter)/2)+marginTop;$(this._dialogElement).css('top',y+'px');}
else if(this._settings.verticalAlign=='bottom')
$(this._dialogElement).css('bottom',marginBottom+'px');else
$(this._dialogElement).css('top',marginTop+'px');};Modal.prototype._callEvent=function(eventName,args)
{if(!this._settings[eventName]||this._disableEvents)
return false;args=args||[];args.unshift(this);this._settings[eventName].apply(this,args);};

function ModalButtons(settings)
{if(ModalButtons.__disableConstructor)
return;if(typeof(settings.messages)!='object')
settings.messages=[settings.messages];ModalButtons.__super.call(this,settings);}
tools.extendClass(ModalButtons,Modal);ModalButtons.prototype.create=function()
{ModalButtons.__super.prototype.create.call(this,arguments);for(var i in this._settings.buttons)
{var thisObj=this;(function()
{var button=thisObj._settings.buttons[i];$(button.selector,thisObj._dialogElement).live('click',function(e)
{thisObj._callEvent(button.eventName);thisObj.remove();thisObj._callEvent(button.afterEventName);e.preventDefault();});})();}};

function ModalButtonsAlert(settings)
{if(ModalButtonsAlert.__disableConstructor)
return;settings=$.extend(true,{type:'info',buttons:{ok:{title:'Îê',cssClass:'ok g_button',selector:'.ok',eventName:'onOk',afterEventName:'onOkAfter'}}},settings);ModalButtonsAlert.__super.call(this,settings);}
tools.extendClass(ModalButtonsAlert,ModalButtons);

function ModalButtonsConfirm(settings)
{if(ModalButtonsConfirm.__disableConstructor)
return;settings=$.extend(true,{type:'info',buttons:{ok:{title:'Äà',cssClass:'ok',selector:'.ok',eventName:'onOk',afterEventName:'onOkAfter'},cancel:{title:'Íåò',cssClass:'cancel',selector:'.cancel',eventName:'onCancel',afterEventName:'onCancelAfter'}}},settings);if(settings.onCancelClose)
{settings.onCancel=settings.onCancelClose;settings.onClose=settings.onCancelClose;}
if(settings.onCancelCloseAfter)
{settings.onCancelAfter=settings.onCancelCloseAfter;settings.onCloseAfter=settings.onCancelCloseAfter;}
ModalButtonsConfirm.__super.call(this,settings);}
tools.extendClass(ModalButtonsConfirm,ModalButtons);

function ModalContent(settings)
{if(ModalContent.__disableConstructor)
return;this._contentElement=null;ModalContent.__super.call(this,settings);}
tools.extendClass(ModalContent,Modal);Modal.prototype.getContentElement=function()
{return this._contentElement;};ModalContent.prototype.create=function()
{ModalContent.__super.prototype.create.call(this,arguments);this._contentElement=$(this._settings.containerElementSelector,this._dialogElement).get(0);$(this._contentElement).html(this._settings.content);};ModalContent.prototype._doWidth=function()
{var width=this._calculateWidth(true);if(width)
{var sidesWidth=$(this._dialogElement).outerWidth()-$(this._contentElement).width();$(this._contentElement).css('width',width-sidesWidth+'px');}};ModalContent.prototype._doHeight=function()
{var height=this._calculateHeight(true);if(height)
{var headerAndFooterHeight=$(this._dialogElement).outerHeight()-$(this._contentElement).height();$(this._contentElement).css('height',height-headerAndFooterHeight+'px');}};

function ModalFrame(settings)
{if(ModalFrame.__disableConstructor)
return;settings=$.extend(true,{showHistoryNav:true,framePageClass:FramePage},settings);settings.framePageSettings=settings.framePageSettings||{};if(!settings.showHistoryNav)
settings.framePageSettings.initialPageLabel='';this._frameElement=null;this._framePage=null;if(settings.framePageSettings.enableIsolationMode)
{if(settings.updateWidthOnLoad)
throw Error('"updateWidthOnLoad" in "ModalFrame" settings deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');if(settings.updateHeightOnLoad)
throw Error('"updateHeightOnLoad" in "ModalFrame" settings deny in isolation mode (see "enableIsolationMode" in "FramePage" settings)');}
var thisObj=this;tools.mixDefaultEvents(settings.framePageSettings,{onStopLoad:function()
{thisObj._updateHistoryNav();if(thisObj._settings.updateWidthOnLoad||thisObj._settings.updateHeightOnLoad)
{var doc=thisObj._frameElement.contentWindow.document;var currentHeight=thisObj._frameElement.contentWindow.innerHeight||$(thisObj._frameElement).height();if(thisObj._settings.updateWidthOnLoad)
$(thisObj._frameElement).css('width','30px');if(thisObj._settings.updateHeightOnLoad)
$(thisObj._frameElement).css('height','30px');var width=$(doc.documentElement.body).width()||doc.documentElement.scrollWidth;var height=doc.documentElement.scrollHeight;if(height<currentHeight&&height+5>currentHeight)
height=currentHeight;if(thisObj._settings.updateWidthOnLoad)
thisObj.setFrameWidth(width);if(thisObj._settings.updateHeightOnLoad)
thisObj.setFrameHeight(height);var scrollbarSize=tools.detectFrameScrollbarSize(thisObj._frameElement);if(thisObj._settings.updateWidthOnLoad)
thisObj.setFrameWidth(width+scrollbarSize.width);if(thisObj._settings.updateHeightOnLoad)
thisObj.setFrameHeight(height+scrollbarSize.height);}}});ModalFrame.__super.call(this,settings);}
tools.extendClass(ModalFrame,Modal);ModalFrame.prototype.create=function()
{ModalFrame.__super.prototype.create.call(this,arguments);var thisObj=this;this._frameElement=$(this._settings.frameElementSelector,this._dialogElement).get(0);this._framePage=new this._settings.framePageClass(this._frameElement,this._settings.url,this._settings.framePageSettings);if(this._framePage.isHistorySupported())
{$(this._settings.backButtonSelector,this._dialogElement).click(function(e){thisObj._framePage.back();e.preventDefault();});$(this._settings.nextButtonSelector,this._dialogElement).click(function(e){thisObj._framePage.next();e.preventDefault();});}
else
{$(this._settings.backButtonSelector,this._dialogElement).hide();$(this._settings.nextButtonSelector,this._dialogElement).hide();}};ModalFrame.prototype.show=function()
{ModalFrame.__super.prototype.show.call(this,arguments);if(this._settings.frameWidth)
this.setFrameWidth(this._settings.frameWidth);if(this._settings.frameMinWidth)
this.setFrameMinWidth(this._settings.frameMinWidth);if(this._settings.frameMaxWidth)
this.setFrameMaxWidth(this._settings.frameMaxWidth);if(this._settings.frameHeight)
this.setFrameHeight(this._settings.frameHeight);if(this._settings.frameMinHeight)
this.setFrameMinHeight(this._settings.frameMinHeight);if(this._settings.frameMaxHeight)
this.setFrameMaxHeight(this._settings.frameMaxHeight);if(this._settings['closeByCookie'])
{var thisObj=this;setTimeout(function(){if($.cookie(thisObj._settings['closeByCookie']))
{$.cookie(thisObj._settings['closeByCookie'],null,{path:'/'});thisObj._callEvent('onCloseByCookie');thisObj.close();thisObj._callEvent('onCloseByCookieAfter');}
else if(thisObj.isShow())
setTimeout(arguments.callee,100);},100);}};ModalFrame.prototype.setFrameWidth=function(width)
{var sidesWidth=$(this._dialogElement).outerWidth()-this._frameElement.offsetWidth;this.setWidth(width+sidesWidth);};ModalFrame.prototype.setFrameMinWidth=function(width)
{var sidesWidth=$(this._dialogElement).outerWidth()-this._frameElement.offsetWidth;this.setMinWidth(width+sidesWidth);};ModalFrame.prototype.setFrameMaxWidth=function(width)
{var sidesWidth=$(this._dialogElement).outerWidth()-this._frameElement.offsetWidth;this.setMaxWidth(width+sidesWidth);};ModalFrame.prototype.setFrameHeight=function(height)
{var headerAndFooterHeight=$(this._dialogElement).outerHeight()-this._frameElement.offsetHeight;this.setHeight(height+headerAndFooterHeight);};ModalFrame.prototype.setFrameMinHeight=function(height)
{var headerAndFooterHeight=$(this._dialogElement).outerHeight()-this._frameElement.offsetHeight;this.setMinHeight(height+headerAndFooterHeight);};ModalFrame.prototype.setFrameMaxHeight=function(height)
{var headerAndFooterHeight=$(this._dialogElement).outerHeight()-this._frameElement.offsetHeight;this.setMaxHeight(height+headerAndFooterHeight);};ModalFrame.prototype._updateHistoryNav=function()
{if(!this._framePage.isHistorySupported())
return;var backButt=$(this._settings.backButtonSelector,this._dialogElement);var nextButt=$(this._settings.nextButtonSelector,this._dialogElement);if(!this._framePage.isCanBack())
backButt.addClass(this._settings.backButtonDisabledCssClass);else
backButt.removeClass(this._settings.backButtonDisabledCssClass);if(!this._framePage.isCanNext())
nextButt.addClass(this._settings.nextButtonDisabledCssClass);else
nextButt.removeClass(this._settings.nextButtonDisabledCssClass);};ModalFrame.prototype._doWidth=function()
{var width=this._calculateWidth(true);if(width)
{var sidesWidth=$(this._dialogElement).outerWidth()-this._frameElement.offsetWidth;$(this._frameElement).css('width',width-sidesWidth+'px');}};ModalFrame.prototype._doHeight=function()
{var height=this._calculateHeight(true);if(height)
{var headerAndFooterHeight=$(this._dialogElement).outerHeight()-this._frameElement.offsetHeight;$(this._frameElement).css('height',height-headerAndFooterHeight+'px');}};

function ModalLoading(settings)
{if(ModalLoading.__disableConstructor)
return;if(typeof(settings.messages)!='object')
settings.messages=[settings.messages];ModalLoading.__super.call(this,settings);}
tools.extendClass(ModalLoading,Modal);ModalLoading.prototype.create=function()
{ModalLoading.__super.prototype.create.call(this,arguments);};

function ObjectKeyStorage()
{this._keys=[];this._values=[];}
ObjectKeyStorage.prototype.set=function(key,value)
{var index=this._findKeyIndex(key);if(index===undefined)
{this._keys.push(key);this._values.push(value);}
else
this._values[index]=value;};ObjectKeyStorage.prototype.setOnce=function(key,value)
{if(this._findKeyIndex(key)===undefined)
this.set(key,value);};ObjectKeyStorage.prototype.get=function(key)
{return this._values[this._findKeyIndex(key)];};ObjectKeyStorage.prototype._findKeyIndex=function(key)
{for(var i in this._keys)
{if(this._keys[i]===key)
return i;}};

$(function(){PositionTip._startMouseTrackingOnce();});function PositionTip(content,settings)
{if(PositionTip.__disableConstructor)
return;this._settings=$.extend(true,{contentType:'html',position:'mouse',autoOpen:true,animationHide:true,mouseTop:20,mouseRight:5,mouseBottom:5,mouseLeft:15,scopePaddingLeftRight:3,scopePaddingTopBottom:3,template:function(settings){return'<div style="display: none; z-index: 9999999; position: absolute; padding: 2px 3px; border: 1px solid #000; background: #ffffe1;"></div>';},prependTo:document.body},settings);this._element=undefined;this._hideTimer=undefined;this._showHandler=undefined;this._hideHandler=undefined;this._defaultCssClass=undefined;if(this._settings.autoOpen)
this.open(content);}
PositionTip._mouseX=null;PositionTip._mouseY=null;PositionTip._startMouseTrackingOnce=function()
{if(PositionTip._startMouseTrackingOnce._isEnabled)
return;PositionTip._startMouseTrackingOnce._isEnabled=true;$(document.body).mousemove(function(e)
{PositionTip._mouseX=e.pageX;PositionTip._mouseY=e.pageY;});};PositionTip.prototype.setSetting=function(name,value)
{this._settings[name]=value;};PositionTip.prototype.getSetting=function(name)
{return this._settings[name];};PositionTip.prototype.getHtmlElement=function()
{return this._element;};PositionTip.prototype.createOnce=function()
{if(!this._element)
this._create();};PositionTip.prototype._create=function()
{this._element=$(this._settings.template(this._settings)).appendTo(this._settings.prependTo).get(0);this._defaultCssClass=$(this._element).attr('class');};PositionTip.prototype.open=function(content)
{this._callEvent('onOpen');if(this._hideTimer)
clearTimeout(this._hideTimer);this.createOnce();this._hide();this._doContent(content);$(this._element).attr('class',(this._defaultCssClass||'')+' '+(this._settings.extraCssClass||''));this._show();if(this._settings.autoHideDelay)
{var thisObj=this;this._hideTimer=setTimeout(function(){thisObj._hide();},this._settings.autoHideDelay)}
this._callEvent('onOpenAfter');};PositionTip.prototype._doContent=function(content)
{if(content==null)
content=this._settings.defaultContent;if(typeof(content)=='function')
content=content();if(content==null)
content='';if(this._settings.contentType=='html')
$(this._element).html(content);else
$(this._element).text(content);};PositionTip.prototype._show=function()
{$(this._element).show();if(this._settings.position=='mouse')
{this._doPositionMouse();var thisObj=this;$(document).bind('mousemove',function(e){thisObj._doPositionMouse();});}
else if(this._settings.position=='viewportCenter')
{this._doPositionViewportCenter();}};PositionTip.prototype._doPositionMouse=function()
{var mouseX=PositionTip._mouseX;var mouseY=PositionTip._mouseY;var size=this._detectSize();var x=mouseX+this._settings.mouseLeft;var rightOutside=(x+size.elementWidth)-(size.winX+size.winWidth);if(rightOutside>0)
x-=size.elementWidth+this._settings.mouseLeft+this._settings.mouseRight;var y=mouseY+this._settings.mouseTop;if(y+size.elementHeight>size.winY+size.winHeight)
y-=size.elementHeight+this._settings.mouseTop+this._settings.mouseBottom;$(this._element).css({left:x,top:y});};PositionTip.prototype._doPositionViewportCenter=function()
{var size=this._detectSize();var x=size.winX+(size.winWidth/2)-size.elementWidth/2;var y=size.winY+(size.winHeight/2)-size.elementHeight/2;$(this._element).css({left:x,top:y});};PositionTip.prototype._detectSize=function()
{return{winX:$(window).scrollLeft()||0,winY:$(window).scrollTop()||0,winWidth:$(window).width()-this._settings.scopePaddingLeftRight,winHeight:$(window).height()-this._settings.scopePaddingTopBottom,elementWidth:$(this._element).outerWidth(),elementHeight:$(this._element).outerHeight()}};PositionTip.prototype.close=function()
{this._callEvent('onClose');this._hide();this._callEvent('onCloseAfter');};PositionTip.prototype._hide=function()
{if(this._element)
{if(this._settings.animationHide)
$(this._element).fadeOut();else
$(this._element).hide();}};PositionTip.prototype._callEvent=function(eventName,args)
{if(!this._settings[eventName]||this._disableEvents)
return false;args=args||[];args.unshift(this);this._settings[eventName].apply(this,args);};

function PriceTools()
{}
PriceTools.formatPrice=function(price,withDec)
{price=String(PriceTools.toNumber(price));price=price.split('.',price);var entire=price[0];var dec=price[1];entire=entire.split("").reverse().join("");entire=entire.replace(/(\d{3})/,'$1 ');entire=entire.split("").reverse().join("");entire=$.trim(entire);if(withDec&&dec>0)
return entire+','+dec;else
return entire;};PriceTools.toNumber=function(price)
{return parseFloat(String(price).replace(/[^\d\,\.]/g,'').replace(/\,/,'.'));};

function QueryStringParser(queryStringOrUrl)
{if(QueryStringParser.__disableConstructor)
return;var matches=queryStringOrUrl.match(/\?(.+)$/i);if(matches)
queryStringOrUrl=matches[1];var query=queryStringOrUrl.split('&');for(var key in query)
{var pair=query[key].split('=');this[decodeURIComponent(pair[0])]=decodeURIComponent(pair[1]);}}


function scroll_table(row,col)
{this.row=row;this.col=col;var offset=$(this.row.get(0)).offset();this.top_offset=offset.top;this.left_offset=offset.left;this.row_container=$('>.fixed',this.row);this.col_container=$('>.fixed',this.col);var cells=$.merge($.makeArray(this.row_container),$.makeArray(this.col_container));cells=$.unique(cells);cells=$(cells);cells.each(function()
{var container=$(this);var cell=container.parent();var cell_height=cell.height();var container_height=container.height();var container_padding_top=parseInt(container.css('padding-top'))||0;var container_padding_bottom=parseInt(container.css('padding-bottom'))||0;var container_border_top=parseInt(container.css('border-top-width'))||0;var container_border_bottom=parseInt(container.css('border-bottom-width'))||0;var container_full_height=container_height+container_padding_top+container_padding_bottom+container_border_top+container_border_bottom;var new_padding_top=container_padding_top;if(cell_height>container_full_height)
{if(cell.css('vertical-align')=='middle')
{new_padding_top=Math.round((cell_height-container_full_height)/2)+container_padding_top;container.css('padding-top',new_padding_top+'px');}
else if(cell.css('vertical-align')=='bottom')
{new_padding_top=Math.round((cell_height-container_full_height))+container_padding_top;container.css('padding-top',new_padding_top+'px');}}
var height=cell_height-new_padding_top-container_padding_bottom-container_border_top-container_border_bottom;if($.browser.msie&&$.browser.version<=6)
container.css('height',height+'px');else
container.css('min-height',height+'px');});var this_obj=this;$(window).scroll(function(e)
{this_obj.pos();});this.pos();}
scroll_table.prototype.pos=function()
{var scroll_y=this.get_scroll_y();var scroll_x=this.get_scroll_x();if(scroll_y>this.top_offset)
this.row_container.css('top',scroll_y-this.top_offset+'px');else
this.row_container.css('top','auto');if(scroll_x>this.left_offset)
this.col_container.css('left',scroll_x-this.left_offset+'px');else
this.col_container.css('left','auto');}
scroll_table.prototype.get_scroll_x=function()
{return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft;}
scroll_table.prototype.get_scroll_y=function()
{return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;}

function SliderRange(slider_range,min,max,step,indexes,correct_max,input_min,input_max)
{if(SliderRange.__disableConstructor)
return;this.slider_range=slider_range;this.min=min;this.max=max;if(correct_max&&typeof(indexes)=='object'&&indexes[indexes.length-1]==this.max)
this.max+=indexes[0]-step;this.step=step;this.indexes=indexes;this.related_input_min=input_min;this.related_input_max=input_max;this.outer_min=this.min==0?0:this.min-this.step;this.outer_max=this.max+this.step;this.slider_range.append('<div class="bg"><div class="container"></div></div>');this.slider_range_container=$('.container',this.slider_range);this.slider=$('<div></div>').appendTo(this.slider_range_container);var this_obj=this;var min_handle;this.slider.slider({range:true,min:this_obj.min,max:this_obj.outer_max,values:[this_obj.input_min(),this_obj.input_max()],step:this_obj.step,slide:function(event,ui){this_obj.update_input((ui.handle==min_handle),ui.value);}});min_handle=$('*',this.slider)[1];if(this.indexes)
this.index_range();this.related_input_min.bind('keyup change',function(e,omit)
{if(!omit)
this_obj.slider_min(e.currentTarget.value);});this.related_input_max.bind('keyup change',function(e,omit)
{if(!omit)
this_obj.slider_max(e.currentTarget.value);});$('.sr-value a',this.slider_range.get(0)).live('click',function(e)
{var is_min=this_obj.pos_by_distance($(e.currentTarget).text());this_obj.update_input(is_min);e.preventDefault();});$('a.sr-begin',this.slider_range.get(0)).live('click',function(e)
{this_obj.slider_min(this_obj.outer_min);this_obj.update_input(true);e.preventDefault();});$('a.sr-end',this.slider_range.get(0)).live('click',function(e)
{this_obj.slider_max(this_obj.outer_max);this_obj.update_input();e.preventDefault();});}
SliderRange.prototype.index_range=function()
{this.slider_range_container.append('<a href="#" class="sr-begin">Â íà÷àëî</a>');for(var i in this.indexes)
{var value=this.indexes[i];var percent_pos=value/(this.outer_max)*100;this.slider_range_container.append('<div class="sr-value" style="left: '+percent_pos+'%"><div><a href="#">'+value+'</a></div></div>');}
this.slider_range_container.append('<a href="#" class="sr-end">Â êîíåö</a>');};SliderRange.prototype.parse_number=basic.parse_number;SliderRange.prototype.update_input=function(is_min,value)
{if(is_min)
{value=typeof(value)=='undefined'?this.slider_min():value;this.input_min(value||'');}
else
{value=typeof(value)=='undefined'?this.slider_max():value;this.input_max(value<=this.max?value:'');}};SliderRange.prototype.pos_by_distance=function(value)
{value=this.parse_number(value);var min=this.slider_min();var max=this.slider_max();var min_distance=(value-min)<0?-(value-min):value-min;var max_distance=(value-max)<0?-(value-max):value-max;if(value==min)
{this.slider_max(value);return false;}
else if(value==max)
{this.slider_min(value);return true;}
else if(value<=min)
{this.slider_min(value);return true;}
else if(value>=max)
{this.slider_max(value);return false;}
else if(min_distance<max_distance)
{this.slider_min(value);return true;}
else
{this.slider_max(value);return false;}};SliderRange.prototype.slider_min=function(value)
{if(typeof(value)=='undefined')
return this.slider.slider('values',0);else
{var min=this.parse_number(value);var max=this.slider_max();if(min<this.min)
min=this.outer_min;if(min>max)
min=max;this.slider.slider('values',0,value===''?this.outer_min:min);}};SliderRange.prototype.slider_max=function(value)
{if(typeof(value)=='undefined')
return this.slider.slider('values',1);else
{var min=this.slider_min();var max=this.parse_number(value);if(max>this.max)
max=this.outer_max;if(max<min)
max=min;this.slider.slider('values',1,value===''?this.outer_max:max);}};SliderRange.prototype.input_min=function(value)
{if(typeof(value)=='undefined')
return this.parse_number(this.related_input_min.val())||this.outer_min;else
{this.related_input_min.val(value);this.related_input_min.trigger('change',true);}};SliderRange.prototype.input_max=function(value)
{if(typeof(value)=='undefined')
return this.parse_number(this.related_input_max.val())||this.outer_max;else
{this.related_input_max.val(value);this.related_input_max.trigger('change',true);}};

function TitleTip(selector,context,settings)
{if(TitleTip.__disableConstructor)
return;this._settings=$.extend(true,{left:0,top:0,delay:500,repeatDelay:1000,scopePaddingLeftRight:3,scopePaddingTopBottom:3,cursorHeight:22,extraCssClass:null,template:function(settings){return'<div style="display: none; z-index: 9999999; position: absolute; padding: 2px 3px; border: 1px solid #000; background: #ffffe1;"></div>';},prependTo:document.body},settings);this._element=null;this._showTimer=null;this._showHandler=null;this._hideHandler=null;this._defaultCssClass=null;var thisObj=this;$(selector,context).live('mouseenter',function(e){thisObj.open(e.currentTarget,true);});}
TitleTip._lastOpened={callerElement:null,instance:null};TitleTip._enableLoseElementsFix=function()
{if(TitleTip._enableLoseElementsFix._isEnabled)
return;TitleTip._enableLoseElementsFix._isEnabled=true;function isInDocument(el)
{var html=document.body.parentNode;while(el)
{if(el===html)
return true;el=el.parentNode;}
return false;}
$(document).mousemove(function()
{if(TitleTip._lastOpened.instance&&!isInDocument(TitleTip._lastOpened.callerElement))
{TitleTip._lastOpened.instance.close();TitleTip._lastOpened.instance=null;}});};TitleTip._mouseX=null;TitleTip._mouseY=null;TitleTip._startMouseTrackingOnce=function()
{if(TitleTip._startMouseTrackingOnce._isEnabled)
return;TitleTip._startMouseTrackingOnce._isEnabled=true;$(document).mousemove(function(e)
{TitleTip._mouseX=e.pageX;TitleTip._mouseY=e.pageY;});};TitleTip.prototype.setSetting=function(name,value)
{this._settings[name]=value;};TitleTip.prototype.getSetting=function(name)
{return this._settings[name];};TitleTip.prototype.getHtmlElement=function()
{return this._element;};TitleTip.prototype.createOnce=function()
{if(!this._element)
this._create();};TitleTip.prototype._create=function()
{this._element=$(this._settings.template(this._settings)).appendTo(this._settings.prependTo).get(0);this._defaultCssClass=$(this._element).attr('class');var thisObj=this;$(this._element).mouseleave(function(e){thisObj._hide();});};TitleTip.prototype.open=function(callerElement,_callByEvent)
{this._callEvent('onOpen',[callerElement]);var title=callerElement.getAttribute('title');if(!title)
return;TitleTip._startMouseTrackingOnce();TitleTip._enableLoseElementsFix();this.createOnce();this._hide();callerElement.setAttribute('title','');$(this._element).html(title).attr('class',(this._defaultCssClass||'')+' '+(this._settings.extraCssClass||'')).attr('title',title);this._show(callerElement,this._settings.delay,_callByEvent);var thisObj=this;$(callerElement).one('mouseleave',function(){thisObj.close(callerElement);});this._showHandler=function()
{var delay=thisObj._settings.repeatDelay!=null?thisObj._settings.repeatDelay:thisObj._settings.delay;thisObj._show(callerElement,delay,true);};this._hideHandler=function(){thisObj._hide();};$(callerElement).bind('mousedown',this._hideHandler);$(callerElement).bind('mouseup',this._showHandler);TitleTip._lastOpened.callerElement=callerElement;TitleTip._lastOpened.instance=this;this._callEvent('onOpenAfter',[callerElement]);};TitleTip.prototype._doPosition=function(callerElement,_callByEvent)
{var winX=$(window).scrollLeft()||0,winY=$(window).scrollTop()||0,winWidth=$(window).width()-this._settings.scopePaddingLeftRight,winHeight=$(window).height()-this._settings.scopePaddingTopBottom;var mouseX,mouseY;if(_callByEvent)
{mouseX=TitleTip._mouseX,mouseY=TitleTip._mouseY;}
else
{var offset=$(callerElement).offset();mouseX=offset.left;mouseY=offset.top;}
var width=$(this._element).outerWidth();var x=mouseX+this._settings.left;var rightOutside=(x+width)-(winX+winWidth);if(rightOutside>0)
x-=rightOutside;var height=$(this._element).outerHeight();var y=mouseY+this._settings.top;if(_callByEvent)
y+=this._settings.cursorHeight;if(y+height>winY+winHeight)
y=mouseY-height-this._settings.top;$(this._element).css({left:x,top:y});};TitleTip.prototype.close=function(callerElement)
{this._callEvent('onClose',[callerElement]);this._hide();if(callerElement)
{callerElement.setAttribute('title',this._element.getAttribute('title'));$(callerElement).unbind('mousedown',this._hideHandler);$(callerElement).unbind('mouseup',this._showHandler);}
this._callEvent('onCloseAfter',[callerElement]);};TitleTip.prototype._show=function(callerElement,delay,_callByEvent)
{if(this._showTimer)
clearTimeout(this._showTimer);var thisObj=this;this._showTimer=setTimeout(function()
{$(thisObj._element).show();thisObj._doPosition(callerElement,_callByEvent);},delay||0)};TitleTip.prototype._hide=function()
{if(this._showTimer)
clearTimeout(this._showTimer);if(this._element)
$(this._element).hide();};TitleTip.prototype._callEvent=function(eventName,args)
{if(!this._settings[eventName]||this._disableEvents)
return false;args=args||[];args.unshift(this);this._settings[eventName].apply(this,args);};

function ToolTip(settings)
{if(ToolTip.__disableConstructor)
return;this._settings=$.extend(true,{message:'',coords:0,elementCoordsLeftShift:0,defaultPositionX:'right',defaultPositionY:'bottom',flipOrientation:'hor',cssClass:'',closeByOutsideClick:true,ignoreFirstOutsideClick:false,closable:true,autoShow:true,template:function(message){return'<div style="display: none; position: absolute;">'+message+'</div>'}},settings);this._settings.parentElement=ToolTip._makeJQueryIfNot(this._settings.parentElement);this._toolTipElement=ToolTip._makeJQueryIfNot(this._settings.toolTipElement);this._scopeStack=this._settings.scopes||[];if(this._settings.autoShow)
this.show();}
ToolTip._makeJQueryIfNot=function(element)
{if(typeof(element)=='object'&&element.constructor!=Object&&element.constructor!=Array&&element.constructor!=Function&&element.constructor!=jQuery)
return $(element);return element;};ToolTip.prototype.setDefaultCoords=function(coords)
{this._settings.coords=coords;};ToolTip.prototype.setFlipOrientation=function(flipOrientation)
{this._settings.flipOrientation=(flipOrientation=='vert'?'vert':'hor');this._updateCssClasses();};ToolTip.prototype.addScope=function(scopeElement,scopePadding)
{this._addScope(scopeElement,scopePadding,'both');};ToolTip.prototype.addVerticalScope=function(scopeElement,scopePadding)
{this._addScope(scopeElement,scopePadding,'y');};ToolTip.prototype.addHorizontalScope=function(scopeElement,scopePadding)
{this._addScope(scopeElement,scopePadding,'x');};ToolTip.prototype._addScope=function(scopeElement,scopePadding,axis)
{scopeElement=ToolTip._makeJQueryIfNot(scopeElement);scopePadding=Number(scopePadding)||0;this._scopeStack.push({element:scopeElement,padding:scopePadding,axis:axis});};ToolTip.prototype.setMessage=function(message)
{this._settings.message=message;$(this.getHtmlElement()).html(this.getTemplateHtml(true));this.posToDefault();};ToolTip.prototype.getMessage=function()
{return this._settings.message;};ToolTip.prototype.setParentElement=function(element)
{this._settings.parentElement=ToolTip._makeJQueryIfNot(element);};ToolTip.prototype.getUsableParentElement=function()
{if(this._settings.parentElement&&this._settings.parentElement.length)
return this._settings.parentElement;else
{if(!document.body)
throw new Error('Body element not found');return $(document.body);}};ToolTip.prototype.setTemplate=function(template)
{this._settings.template=template;};ToolTip.prototype.getHtmlElement=function()
{return this._toolTipElement[0];};ToolTip.prototype.createOnce=function()
{if(!this._toolTipElement)
this._create();};ToolTip.prototype._create=function()
{this._toolTipElement=$(this.getTemplateHtml(false)).appendTo(this.getUsableParentElement());this._toolTipElement.addClass(this._settings.cssClass);var thisObj=this;if(this._settings.closable&&this._settings.closeButtonSelector)
{$(this._settings.closeButtonSelector,this.getHtmlElement()).live('click',function(e)
{thisObj.close();e.preventDefault();});}
if(this._settings.closeByOutsideClick)
{$(document).one('click',function(e)
{if(thisObj._settings.ignoreFirstOutsideClick)
{$(document).one('click',function(e){thisObj.close();});}
else
thisObj.close();});$(this.getHtmlElement()).click(function(e){e.stopPropagation();});}};ToolTip.prototype.getTemplateHtml=function(isUpdate)
{return this._settings.template(this._settings,isUpdate);};ToolTip.prototype._updateCssClasses=function(xPos,yPos)
{if(!this._toolTipElement)
return;this._toolTipElement.removeClass('tt-flip_hor tt-flip_vert').addClass('tt-flip_'+this._settings.flipOrientation);if(xPos)
{this._toolTipElement.removeClass('tt-left tt-right').addClass('tt-'+xPos);}
if(yPos)
{this._toolTipElement.removeClass('tt-top tt-bottom').addClass('tt-'+yPos);}};ToolTip.prototype.remove=function()
{this._toolTipElement.remove();};ToolTip.prototype.close=function()
{this.remove();};ToolTip.prototype.show=function()
{this.createOnce();this._toolTipElement.css('visibility','hidden');this._toolTipElement.show();this.posToDefault();this._toolTipElement.css('visibility','visible');};ToolTip.prototype.hide=function(animation,speed)
{if(!animation)
{animation='hide';speed=0;}
else if(!speed)
speed='normal';this._toolTipElement[animation](speed);};ToolTip.prototype.posToDefault=function()
{this.posTo(this._settings.coords);};ToolTip.prototype.posTo=function(coords)
{var pointCoords=this._getPointCoordsAndPos(coords);this._toolTipElement.css({left:pointCoords.x+'px',top:pointCoords.y+'px'});this._updateCssClasses(pointCoords.xPos,pointCoords.yPos);};ToolTip.prototype._derefFlipPointCoords=function(coords)
{var derefCoords;if(typeof(coords)=='object')
{if(coords.constructor==Array)
{if(coords.length==1)
derefCoords={topPosY:coords[0],rightPosX:coords[0],bottomPosY:coords[0],leftPosX:coords[0]};else if(coords.length==2)
derefCoords={topPosY:coords[1],rightPosX:coords[0],bottomPosY:coords[1],leftPosX:coords[0]};else if(coords.length==3)
derefCoords={topPosY:coords[0],rightPosX:coords[1],bottomPosY:coords[2],leftPosX:coords[1]};else
derefCoords={topPosY:coords[0],rightPosX:coords[1],bottomPosY:coords[2],leftPosX:coords[3]};}
else
{var locationElement=ToolTip._makeJQueryIfNot(coords);var absPos=locationElement.offset();var width=locationElement.outerWidth();var height=locationElement.outerHeight();var localCoords=this._absPointCoordsToLocal(absPos.left,absPos.top,this._toolTipElement.offsetParent());derefCoords={topPosY:localCoords.y,rightPosX:localCoords.x+width+this._settings.elementCoordsLeftShift,bottomPosY:localCoords.y+height,leftPosX:localCoords.x+this._settings.elementCoordsLeftShift};}}
else
{derefCoords={topPosY:coords,rightPosX:coords,bottomPosY:coords,leftPosX:coords};}
return this._correctCoords(derefCoords);};ToolTip.prototype._correctCoords=function(derefCoords)
{for(var i in derefCoords)
{derefCoords[i]=Number(derefCoords[i])||0;}
return derefCoords;};ToolTip.prototype._getPointCoordsAndPos=function(coords)
{var flipPointCoords=this._derefFlipPointCoords(coords);flipPointCoords=this._correctFlipPointCoordsByOrientation(flipPointCoords);var toolTipAreaCoordsInAllPos=this._detectToolTipAreaCoordsInAllPos(flipPointCoords);var scopeOut=this._detectScopeOut(toolTipAreaCoordsInAllPos);var xPos=this._getPointPosForX(scopeOut);var yPos=this._getPointPosForY(scopeOut);var x,y;if(xPos=='right')
x=toolTipAreaCoordsInAllPos.rightPosX1;else
x=toolTipAreaCoordsInAllPos.leftPosX1;if(yPos=='top')
y=toolTipAreaCoordsInAllPos.topPosY1;else
y=toolTipAreaCoordsInAllPos.bottomPosY1;return{x:x,y:y,xPos:xPos,yPos:yPos};};ToolTip.prototype._getPointPosForX=function(scopeOut)
{var xPos;if(this._settings.defaultPositionX=='left')
{xPos='left';if(scopeOut.leftOutWhenLeftPos)
xPos='right';}
else
{xPos='right';if(scopeOut.rightOutWhenRightPos&&!scopeOut.leftOutWhenLeftPos)
xPos='left';}
return xPos;};ToolTip.prototype._getPointPosForY=function(scopeOut)
{var yPos;if(this._settings.defaultPositionY=='top')
{yPos='top';if(scopeOut.topOutWhenTopPos)
yPos='bottom';}
else
{yPos='bottom';if(scopeOut.bottomOutWhenBottomPos&&!scopeOut.topOutWhenTopPos)
yPos='top';}
return yPos;};ToolTip.prototype._detectToolTipAreaCoordsInAllPos=function(flipPointCoords)
{var tt_width=parseInt(this._toolTipElement.outerWidth())||0;var tt_height=parseInt(this._toolTipElement.outerHeight())||0;return{leftPosX1:flipPointCoords.leftPosX-tt_width,leftPosX2:flipPointCoords.leftPosX,rightPosX1:flipPointCoords.rightPosX,rightPosX2:flipPointCoords.rightPosX+tt_width,topPosY1:flipPointCoords.topPosY-tt_height,topPosY2:flipPointCoords.topPosY,bottomPosY1:flipPointCoords.bottomPosY,bottomPosY2:flipPointCoords.bottomPosY+tt_height};};ToolTip.prototype._absPointCoordsToLocal=function(absX,absY,basePositionedElement)
{var baseAbsPos=basePositionedElement.offset();return{x:absX-baseAbsPos.left,y:absY-baseAbsPos.top};};ToolTip.prototype._correctFlipPointCoordsByOrientation=function(flipPointCoords)
{var locationElementWidth=flipPointCoords.rightPosX-flipPointCoords.leftPosX;var locationElementHeight=flipPointCoords.bottomPosY-flipPointCoords.topPosY;var correctedCoords={leftPosX:flipPointCoords.leftPosX,rightPosX:flipPointCoords.rightPosX,topPosY:flipPointCoords.topPosY,bottomPosY:flipPointCoords.bottomPosY};if(this._settings.flipOrientation=='hor')
{correctedCoords.topPosY+=locationElementHeight/2;correctedCoords.bottomPosY-=locationElementHeight/2;}
else
{correctedCoords.leftPosX+=locationElementWidth/2;correctedCoords.rightPosX-=locationElementWidth/2;}
return correctedCoords;};ToolTip.prototype._detectToolTipAbsFlipAreaCoords=function(toolTipAreaCoordsInAllPos)
{var width=this._toolTipElement.outerWidth();var height=this._toolTipElement.outerHeight();var absPos=this._toolTipElement.offsetParent().offset();var leftPosX1=toolTipAreaCoordsInAllPos.leftPosX1+absPos.left;var rightPosX1=toolTipAreaCoordsInAllPos.rightPosX1+absPos.left;var topPosY1=toolTipAreaCoordsInAllPos.topPosY1+absPos.top;var bottomPosY1=toolTipAreaCoordsInAllPos.bottomPosY1+absPos.top;return{leftPosX1:leftPosX1,leftPosX2:leftPosX1+width,rightPosX1:rightPosX1,rightPosX2:rightPosX1+width,topPosY1:topPosY1,topPosY2:topPosY1+height,bottomPosY1:bottomPosY1,bottomPosY2:bottomPosY1+height};};ToolTip.prototype._detectScopeAbsAreaCoords=function()
{var xScope=this._getUsableHorizontalScope();var yScope=this._getUsableVerticalScope();var xScopePos=xScope.element.offset();var yScopePos=yScope.element.offset();var scopeHeight=yScope.element.outerHeight();if(scopeHeight==0&&yScope.element.get(0)===document.body)
scopeHeight=$(document).height();var scopeWidth=xScope.element.outerWidth();var x1=xScopePos.left+xScope.padding;var x2=xScopePos.left+scopeWidth-xScope.padding;var y1=yScopePos.top+yScope.padding;var y2=yScopePos.top+scopeHeight-yScope.padding;return{x1:x1,y1:y1,x2:x2,y2:y2};};ToolTip.prototype._getUsableVerticalScope=function()
{return this._getUsableScope('y');};ToolTip.prototype._getUsableHorizontalScope=function()
{return this._getUsableScope('x');};ToolTip.prototype._getUsableScope=function(axis)
{var reverseScopeStack=this._scopeStack.slice(0,this._scopeStack.length).reverse();for(var i in reverseScopeStack)
{var curScope=reverseScopeStack[i];if(curScope.element&&curScope.element.length&&(!axis||curScope.axis==axis||curScope.axis=='both'))
return curScope;}
if(!document.body)
throw new Error('Body element not found');return{element:$(document.body),padding:0};};ToolTip.prototype._detectScopeOut=function(toolTipAreaCoordsInAllPos)
{var toolTipAbsFlipAreaCoords=this._detectToolTipAbsFlipAreaCoords(toolTipAreaCoordsInAllPos);var scopeAbsAreaCoords=this._detectScopeAbsAreaCoords();var scopeOut={topOutWhenTopPos:false,rightOutWhenRightPos:false,bottomOutWhenBottomPos:false,leftOutWhenLeftPos:false};if(toolTipAbsFlipAreaCoords.topPosY1<scopeAbsAreaCoords.y1)
scopeOut.topOutWhenTopPos=true;if(toolTipAbsFlipAreaCoords.rightPosX2>scopeAbsAreaCoords.x2)
scopeOut.rightOutWhenRightPos=true;if(toolTipAbsFlipAreaCoords.bottomPosY2>scopeAbsAreaCoords.y2)
scopeOut.bottomOutWhenBottomPos=true;if(toolTipAbsFlipAreaCoords.leftPosX1<scopeAbsAreaCoords.x1)
scopeOut.leftOutWhenLeftPos=true;return scopeOut;};

function UrlParser(url)
{var urlParts=String(url).match(new RegExp('^'+'(?:([^\\/\\?\\#]+)\\:\\/\\/)?'+'([^\\/\\?\\#]*)'+'([^\\?\\#]*)'+'(?:\\?([^\\#]*))?'+'(?:\\#(.*))?'+'$','i'));this.url=url;this.protocol=urlParts[1]||'';this.host=urlParts[2]||'';this.path=urlParts[3]||'';this.query=new QueryString(urlParts[4]||'');this.fragment=urlParts[5]||'';function QueryString(queryString)
{var query=queryString.split('&');for(var key in query)
{var pair=query[key].split('=');this[decodeURIComponent(pair[0])]=decodeURIComponent(pair[1]||'');}}}
UrlParser.prototype.getQueryAsString=function()
{var queryString='';for(var name in this.query)
{queryString+='&'+encodeURIComponent(name);var value=this.query[name];if(value!=null&&value!='')
queryString+='='+encodeURIComponent(value);}
return queryString.slice(1);};UrlParser.prototype.getQueryAsStringWithQuestion=function()
{var queryString=this.getQueryAsString();return queryString?'?'+queryString:queryString;};UrlParser.prototype.getQueryAsStringWithAmpersand=function()
{var queryString=this.getQueryAsString();return queryString?'&'+queryString:queryString;};UrlParser.prototype.getFragmentWithHash=function()
{return this.fragment?'#'+this.fragment:this.fragment;};

function ValsContainer(container,empty_text,left_delim,right_delim,max_width,ending)
{this.container=container;this.empty_text=empty_text;this.left_delim=left_delim;this.right_delim=right_delim;this.max_width=max_width;this.ending=ending;if(this.empty_text==null)
this.empty_text='';if(this.left_delim==null)
this.left_delim='[';if(this.right_delim==null)
this.right_delim=']';if(this.ending==null)
this.ending='&hellip;';}
ValsContainer.prototype.set_max_width=function(max_width)
{this.max_width=max_width;};ValsContainer.prototype.remake_content=function()
{this._set_container_text(this._get_container_text());};ValsContainer.prototype.insert_value=function(class_name,title)
{var container_text=this._get_container_text();var current_value=$('.'+class_name,this.container);if(current_value.length>0)
{current_value.text(title);this._set_container_text(this._get_container_text());return current_value;}
var value_html='<span class="'+class_name+'">'+title+'</span>';if(container_text!='')
container_text+=', '+value_html;else
container_text+=value_html;this._set_container_text(container_text);return $('.'+class_name,this.container);};ValsContainer.prototype.remove_value=function(class_name)
{$('.'+class_name,this.container).remove();var container_text=this._get_container_text();container_text=container_text.replace(/, , /g,', ').replace(/^, /,'').replace(/, $/,'');this._set_container_text(container_text);};ValsContainer.prototype._get_container_text=function()
{var container_text=$('.text',this.container).html();if(container_text==null)
container_text=this.container.html();if(container_text==this.empty_text)
container_text='';return container_text;};ValsContainer.prototype._set_container_text=function(container_text)
{if(container_text=='')
{this.container.addClass('empty');this.container.html(this.empty_text);}
else
{this.container.removeClass('empty');this.container.html(this._wrap_container_text(container_text));if(this.max_width&&this.container.width()>this.max_width)
{var text_max_width=this._calculate_text_max_width(container_text);this.container.html(this._wrap_container_text(container_text,true,text_max_width));}}};ValsContainer.prototype._wrap_container_text=function(container_text,is_truncated,text_max_width)
{if(is_truncated&&text_max_width)
return this.left_delim+'<span class="text truncated" title="'+container_text.replace(/<[^>]*>/g,'')+'" style="width: '+text_max_width+'px;">'+container_text+'</span>'+this.ending+this.right_delim;else if(is_truncated)
return this.left_delim+'<span class="text">'+container_text+'</span>'+this.ending+this.right_delim;else
return this.left_delim+'<span class="text">'+container_text+'</span>'+this.right_delim;};ValsContainer.prototype._calculate_text_max_width=function(container_text)
{if(this.container.width()>this.max_width)
{this.container.html(this._wrap_container_text(container_text,true));var container_values=$('.text',this.container);var str=container_values.text();while(str.length>0)
{if(this.container.width()>this.max_width||str.charAt(str.length-1).search(/[^a-zà-ÿ¸¨0-9]/i)!=-1)
{str=str.slice(0,-1);container_values.text(str);}
else
return container_values.width();}}
return this.max_width;};

$(document).ready(function()
{$(document.body).mousemove(function(e){wait.mouse_x=e.clientX;wait.mouse_y=e.clientY;wait.abs_mouse_x=wait.mouse_x+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft);wait.abs_mouse_y=wait.mouse_y+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);});wait.doc_width=$(document).width();wait.doc_height=$(document).height();});wait={target:null,top_offset:-10,right_offset:10,bottom_offset:10,left_offset:10,show_counter:0,mouse_x:0,mouse_y:0,abs_mouse_x:0,abs_mouse_y:0,width:0,height:0,show:function(position)
{wait.doc_width=$(document).width();wait.doc_height=$(document).height();if(wait.show_counter==0)
{var msg='Èä¸ò çàãðóçêà...';wait.target=$('<div class="g_wait">'+msg+'</div>').appendTo(document.body);if(!wait.width&&!wait.height)
{wait.width=wait.target.outerHeight();wait.height=wait.target.outerHeight();}
if(position=='mouse')
{wait.bind_mouse();wait.pos_to_mouse();}
else if(position=='center')
{wait.pos_to_center();}}
wait.show_counter++;},hide:function()
{if(wait.show_counter>0)
wait.show_counter--;if(wait.show_counter==0&&wait.target)
{wait.target.remove();wait.unbind_mouse();}},bind_mouse:function()
{if(!wait.bind_to_mouse)
$(document.body).mousemove(wait.pos_to_mouse);wait.bind_to_mouse=1;},unbind_mouse:function()
{wait.bind_to_mouse=0;$(document.body).unbind('mousemove',wait.pos_to_mouse);},pos_to_mouse:function()
{if(wait.mouse_x+wait.right_offset+wait.width>=wait.doc_width)
var x=wait.abs_mouse_x-wait.width-wait.left_offset;else
var x=wait.abs_mouse_x+wait.right_offset;if(wait.mouse_y+wait.bottom_offset+wait.height+6>=wait.doc_height)
var y=wait.doc_height-wait.height-6;else
var y=wait.abs_mouse_y+wait.bottom_offset;wait.target.css({'left':x+'px','top':y+'px'});},pos_to_center:function()
{var x=wait.doc_width/2-wait.width/2;var y=wait.doc_height/2-wait.height/2;wait.target.css({'left':x+'px','top':y+'px'});}};

function warning_line(msg,cookie_name)
{if(cookie_name)
this.cookie_name=cookie_name;else
this.cookie_name=warning_line.default_cookie_name;var is_closed=parseInt(warning_line.get_cookie(this.cookie_name));if(is_closed)
throw new Error('Äàííîå ïðåäóïðåæäåíèå áûëî çàêðûòî ïîëüçîâàòåëåì ðàíåå');this.target=$(warning_line.tpl(msg)).prependTo(document.body);this.hide();var this_obj=this;warning_line.css.close_a_tag(this.target).click(function()
{this_obj.close(this_obj);});return false;}
warning_line.create_once=function(msg)
{if(warning_line.once_obj==null)
warning_line.once_obj=new warning_line(msg);else if(msg)
warning_line.once_obj.msg(msg);return warning_line.once_obj;}
warning_line.reset_closed=function(cookie_name)
{if(!cookie_name)
cookie_name=warning_line.default_cookie_name;var cookie=cookie_name+'=0; max-age=0';if(warning_line.cookie_path)
cookie+="; path="+warning_line.cookie_path;if(warning_line.cookie_domain)
cookie+="; domain="+warning_line.cookie_domain;document.cookie=cookie;}
warning_line.get_cookie=function(cookie_name)
{if(!cookie_name)
throw Error('Empty cookie name');var cookies=document.cookie;var pos=cookies.indexOf(cookie_name+'=');if(pos!=-1)
{var name_length=cookie_name.length+1;var start=pos+name_length;var end=cookies.indexOf(';',start);if(end==-1)
end=cookies.length;return decodeURIComponent(cookies.substring(start,end));}}
warning_line.prototype.enable_important=function()
{this.target.addClass(warning_line.css.important_class);}
warning_line.prototype.disable_important=function()
{this.target.removeClass(warning_line.css.important_class);}
warning_line.prototype.enable_close=function()
{this.target.addClass(warning_line.css.closable_class);}
warning_line.prototype.disable_close=function()
{this.target.removeClass(warning_line.css.closable_class);}
warning_line.prototype.msg=function(msg)
{if(arguments.length)
warning_line.css.msg(this.target).html(msg);else
return warning_line.css.msg(this.target).html();}
warning_line.prototype.show=function()
{warning_line.css.content().addClass(warning_line.css.content_showed_class);this.target.show();}
warning_line.prototype.hide=function()
{this.target.hide();warning_line.css.content().removeClass(warning_line.css.content_showed_class);}
warning_line.prototype.remove=function()
{if(this.target==warning_line.once_obj.target)
warning_line.once_obj=null;this.target.remove();warning_line.css.content().removeClass(warning_line.css.content_showed_class);}
warning_line.prototype.close=function(this_obj)
{if(!this_obj)
this_obj=this;var cookie=this_obj.cookie_name+'=1';if(warning_line.cookie_path)
cookie+="; path="+warning_line.cookie_path;if(warning_line.cookie_domain)
cookie+="; domain="+warning_line.cookie_domain;document.cookie=cookie;this_obj.remove();}

