Files
2017-03-02 21:57:21 -06:00

33 lines
977 B
PHP
Executable File

if( document.images )
{
var whoarewe_btn = PreLoad( '<?php echo $_LANG ?>_whoarewe' );
var whatdowedo_btn = PreLoad( '<?php echo $_LANG ?>_whatdowedo' );
var howdowedoit_btn = PreLoad( '<?php echo $_LANG ?>_howdowedoit' );
var where_btn = PreLoad( '<?php echo $_LANG ?>_where' );
}
function PreLoad(btn)
{
var img_path = "/pae.co.at/graphics/buttons/"; //file path to find button images
var temp = new Array();
temp[0] = new Image(); //don't know which image we're actually loading
temp[1] = new Image(); //so format temp to hold an image, any image
//then we can use .src to load each button img
temp[0].src = img_path + btn + "" + ".jpg"; //first version: no mouse over image
temp[1].src = img_path + btn + "2" + ".jpg"; //second version: mouse over image
return temp;
}
function Swap(btn, mouse_on)
{
var img = btn.id;
if(document.images )
{
var temp = eval(img);
document[img].src = temp[mouse_on].src;
}
}