var curCol = 0;
//var w = document.body.clientWidth;

var flash = false;
var plugin;
var version = 6;


function showHelp(elName){
       var agt = navigator.userAgent.toLowerCase();
       var is_bsd   = (agt.indexOf("bsd") != -1);
       var is_x11   = (agt.indexOf("x11") != -1);
       var is_linux = (agt.indexOf("linux") != -1);
       var is_mac   = (agt.indexOf("mac") != -1);
       obj = document.getElementById(elName).style;
       if ( is_bsd || is_x11 || is_linux || is_mac ) {
             obj.top = '20px';
       }
       obj.display = (obj.display != 'block' ? 'block' : 'none');
}


function checkRegisterFormFields() {
missinginfo = "";
if (document.form.Login.value == "") {
missinginfo += "\n     -  Логин";
}
if(document.form.Password.value == "") {
missinginfo += "\n     -  Пароль";
}
if(document.form.Password2.value == "") {
missinginfo += "\n     -  Повтор пароля";
}
if(document.form.Name.value == "") {
missinginfo += "\n     -  Имя";
}
if(document.form.Email.value == "") {
missinginfo += "\n     -  Адрес электронной почны";
}

if(document.form.Password.value !=document.form.Password2.value) {
alert("Пароль и повтор пароля должны совпадать! Пожалуйста, наберите их еще раз.");
return false;
}

if (missinginfo != "") {
missinginfo ="__________________________________________________________\n" +
"Вы не заполнили следующие поля, обязательные для заполнения:\n" +
missinginfo + "\n__________________________________________________________" +
"\nПожалуйста, введите эту информацию!";
alert(missinginfo);
return false;
}
else 
{
disableBtn()
return true;
}
}

function enableBtn(){
       obj = document.getElementById('SubmitBtn');
       obj.disabled = false;
}

function disableBtn(){
       obj = document.getElementById('SubmitBtn');
       obj.disabled = true;
	   return true
}

function MM_openBrWindow(location,ID ) { 
  window.open(location,"a"+ID,"toolbar=no,menubar=no,scrollbars=yes,width=550,height=440");
}



function confirmDelete(aCaption) {
if (confirm("Вы действительно желаете удалить " + aCaption+"?") != true) {
return false;
}
else return true;
}


function MM_rewriteTextBySelect(elName,selObj){ //v3.0
  obj = document.getElementById(elName);
  obj.innerHTML=selObj.options[selObj.selectedIndex].value;
}

function writeContact(){
  document.write('Есть вопросы, предложения? Пишите нам: <a href="mai');
  document.write('lto:');
  document.write('ban');
  document.write('ktestov');
  document.write('@');
  document.write('mail');
  document.write('.ru">');

  document.write('BankT');
  document.write('estov');
  document.write('@');
  document.write('mail.');
  document.write('ru</a>');
}

function writeLeftDop1(){
	document.write('<div id="dopolnenie"><a href="/">тесты</a></div>');
}

function writeAdStr(){
  document.write('<p><a href="" target="_blank">АСТУР: профессиональный тест умственного развития абитуриентов и старшеклассников</a></p>')
}
