var loaded = false;
var img1on = new Image();
var img2on = new Image();
var img3on = new Image();
var img4on = new Image();
var img5on = new Image();
var img6on = new Image();
var img7on = new Image();
var img1off = new Image();
var img2off = new Image();
var img3off = new Image();
var img4off = new Image();
var img5off = new Image();
var img6off = new Image();
var img7off = new Image();

var arGlos = new Array();
var gloss;

function skrij() {
  if (document.getElementById) {
    gloss = document.getElementById('glos');
    gloss.style.visibility = 'hidden';
    }
  else if (document.all) {
    document.all.glos.style.visibility = 'hidden';
    }
  else {
    return false;
  }
}

function glos(q) {
  if (document.getElementById) {
    gloss = document.getElementById('glos');
    gloss.style.left = "40%";
    gloss.innerHTML = "<b>"+arGlos[q]+"</b><br /><input type='checkbox' onClick='skrij();' />Check to close";
    gloss.style.visibility = 'visible';
  }
  else if (document.all) {
    document.all.glos.innerHTML = arGlos[q];
    document.all.glos.style.visibility = 'visible';
  }
  else {
    return false;
  }
}

function eliminatespawn() {
  if (eval("document.questions.weird.checked") == true) {
    document.questions.age.disabled = true;
    document.questions.gender[0].disabled = true;
    document.questions.gender[1].disabled = true;
    document.questions.location.disabled = true;
    document.questions.position.disabled = true;
  }
  else {
    document.questions.age.disabled = false;
    document.questions.gender[0].disabled = false;
    document.questions.gender[1].disabled = false;
    document.questions.location.disabled = false;
    document.questions.position.disabled = false;
  }
  return true;
}

function imageLoad() {
    if (document.images) {


	return (loaded = true);
    }
}

function rollOut(imgName) {
    if (document.images) {
	document[imgName].src = eval(imgName+"off.src");
    }
}

function rollIn(imgName) {
    if (document.images && (loaded == true)) {
	document[imgName].src = eval(imgName+"on.src");
    }
}

function sh(msg) {
if (document.getElementById) {

  msgsplit = msg.split('<br>');
  stmp = document.getElementById('s1');
  if (stmp.lastChild) {  stmp.removeChild(stmp.lastChild); } //description 
  stmp.appendChild(document.createTextNode(msgsplit[0]));
  stmp = document.getElementById('s2');
  stmp.appendChild(document.createTextNode(msgsplit[1]));
  stmp = document.getElementById('s3');
  stmp.appendChild(document.createTextNode(msgsplit[2]));

  }
else if (document.all) {
  document.all.descDiv.innerHTML = msg;
  }
else if (document.layers) {
  desc = document.layers[descDiv];
  desc.document.open();
  desc.document.write(msg);
  desc.document.close();
  }
else {
  return false;
  }
}

function hi() {
if (document.getElementById) {
  stmp = document.getElementById('s1');
  if (stmp.lastChild) {  stmp.removeChild(stmp.lastChild); }
  stmp = document.getElementById('s2');
  if (stmp.lastChild) {  stmp.removeChild(stmp.lastChild); }
  stmp = document.getElementById('s3');
  if (stmp.lastChild) {  stmp.removeChild(stmp.lastChild); }  
  
  stmp = document.getElementById('s1');
  stmp.appendChild(document.createTextNode('Description')); //description

  }
else if (document.all) {
  document.all.descDiv.innerHTML = 'Description<br><br><br>';
  }
else if (document.layers) {
  desc = document.layers[descDiv];
  desc.document.open();
  desc.document.write('Description<br><br><br>');
  desc.document.close();
  }
else {
  return true;
  }
}

function addFav(){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, 'AKOCER WEB');
  }
}

function change(color) {
 if (document.getElementById) {
    lay = document.getElementById('id1');
    lay.setAttribute('bgColor', color);
    lay = document.getElementById('id2');
    lay.setAttribute('bgColor', color);
  }
  else if (document.layers) {
    window.document.layers['id1'].bgColor = color;
    window.document.layers['id2'].bgColor = color;
  }
  else if (document.all) {
    window.document.all['id1'].style.background = color;
    window.document.all['id2'].style.background = color;
  }
}

function copytext(field) {
	temp = eval("document." + field);
	temp.focus();
	temp.select();
	txtrange = temp.createTextRange();
	txtrange.execCommand("Copy");
}

