/*
Developed by dAxpHpNIzER
Copyright (C) Lukas Wojcik 2006
*/

function hover1x(id, st)
{
 document.getElementById(id).style.background = 'url(./templates/Stats4UStyle/img/btnverlauf' + st + 'x2.gif)';
 return;
}

function hover2x(id, st)
{
 document.getElementById(id).style.background = 'url(./templates/Stats4UStyle/img/btnverlauf' + st + '.gif)';
 return;
}

function hover3x(id, st)
{
 document.getElementById(id).style.background = 'url(./templates/Stats4UStyle/img/btnverlauf' + st + 'x3.gif)';
 document.getElementById(id).disabled = true;
 return;
}

function hover4x(id, st)
{
 document.getElementById(id).style.background = 'url(./templates/Stats4UStyle/img/btnverlauf' + st + 'x3.gif)';
 return;
}

xpic1 = new Image(3,20); 
xpic1.src = "./templates/Stats4UStyle/img/btnverlauf1.gif"; 
pic1x2 = new Image(3,20); 
pic1x2.src = "./templates/Stats4UStyle/img/btnverlauf1x2.gif"; 
pic1x3 = new Image(3,20); 
pic1x3.src = "./templates/Stats4UStyle/img/btnverlauf1x3.gif"; 
picxx1 = new Image(230,65); 
picxx1.src = "./img/wizard_normal.gif"; 
picxx2 = new Image(230,65); 
picxx2.src = "./img/wizard_onmouseover.gif"; 
picxx3 = new Image(230,65); 
picxx3.src = "./img/wizard_onclick.gif"; 

function doCopy(theField)
{
 var copytoclip = 1
 var tempval = eval("document." + theField)
 tempval.focus()
 tempval.select()
 if(document.all && copytoclip == 1)
 {
  therange = tempval.createTextRange();
  therange.execCommand("Copy");
 }
 return;
}

var onclicked_wizard = false;

function wizardbutton(a)
{
 if(a == 1 && onclicked_wizard == false)
 {
  document.getElementById('wizardimg').src = './img/wizard_onmouseover.gif';
 }
 else if(a == 2 && onclicked_wizard == false)
 {
  document.getElementById('wizardimg').src = './img/wizard_normal.gif';
 }
 else if(a == 3)
 {
  document.getElementById('wizardimg').src = './img/wizard_onclick.gif';
  onclicked_wizard = true;
 }
 return;
}

function selectColor(color) 
{
 document.getElementById('bwfcds').value = color;
 colorize('actual', color);
 return;
}

function selectColor2(color) 
{
 document.getElementById('bwfcds2').value = color;
 colorize('actual2', color);
 return;
}

function selectColor3(color) 
{
 document.getElementById('bwfcds3').value = color;
 colorize('actual3', color);
 return;
}

function colorize(id, farbcode)
{
 if(farbcode.length == 6)
 {
  document.getElementById(id).style.backgroundColor = "#" + farbcode;
  document.getElementById(id).style.color = "#" + farbcode;
 }
 return;
}