/
InfoButton.js
28 lines (24 loc) · 960 Bytes
/
InfoButton.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
This file was generated by Dashcode and is covered by the
license.txt included in the project. You may edit this file,
however it is recommended to first turn off the Dashcode
code generator otherwise the changes will be lost.
*/
function CreateInfoButton(elementOrID, spec)
{
var flipElement = elementOrID;
if (elementOrID.nodeType != Node.ELEMENT_NODE) {
flipElement = document.getElementById(elementOrID);
}
if (!flipElement.loaded) {
flipElement.loaded = true;
while (flipElement.firstChild) {
flipElement.removeChild(flipElement.firstChild);
}
var onclick = spec.onclick || null;
try { onclick = eval(onclick); } catch (e) { onclick = null; }
flipElement.object = new AppleInfoButton(flipElement, document.getElementById(spec.frontID), spec.foregroundStyle, spec.backgroundStyle, onclick);
flipElement.object.element = flipElement;
}
return flipElement.object;
}