toolbar buttons



















var backbtn_enable = false;
var forwardbtn_enable = false;

// setup the toolbar buttons
toolbar_btns = document.createElement("DIV");
document.getElementById("maindiv").appendChild(toolbar_btns);
toolbar_btns.style.position = "absolute";
toolbar_btns.style.top = "0px";
toolbar_btns.style.left = "2px";

// make the toolbar buttons
backbtn = document.createElement("IMG");
backbtn.src = parent.www_dir + "templates/images/back_disable.gif";
backbtn.id = "back";
toolbar_btns.appendChild(backbtn);

forwardbtn = document.createElement("IMG");
forwardbtn.src = parent.www_dir + "templates/images/forward_disable.gif";
forwardbtn.id = "forward";
toolbar_btns.appendChild(forwardbtn);

refreshbtn = document.createElement("IMG");
refreshbtn.src= parent.www_dir + "templates/images/refresh_norm.gif";
refreshbtn.id = "refresh";
toolbar_btns.appendChild(refreshbtn);
addtoolbarbtnevent(refreshbtn);

printbtn = document.createElement("IMG");
printbtn.src = parent.www_dir + "templates/images/print_norm.gif";
printbtn.id="print";
toolbar_btns.appendChild(printbtn);
addtoolbarbtnevent(printbtn);

iconsdiv = document.createElement("DIV");
iconsdiv.style.cssFloat = "right"; // W3 alignment
iconsdiv.style.styleFloat = "right"; // IE alignment
document.getElementById("maindiv").appendChild(iconsdiv);

// make the minimize button
minimizeicon = document.createElement("IMG");
minimizeicon.src = parent.www_dir + "templates/images/minimize_norm.gif";
minimizeicon.id = "minimize";
iconsdiv.appendChild(minimizeicon);
if(document.all) minimizeicon.style.cursor = "hand";
else minimizeicon.style.cursor = "pointer";
addevent(minimizeicon,"mousedown",changeicon,false);
addevent(minimizeicon,"mouseout",changeicon,false);
addevent(minimizeicon,"mouseup",changeicon,false);
addevent(minimizeicon,"click",minimize,false);

// make the close icon
closeicon = document.createElement("IMG");
closeicon.src = parent.www_dir + "templates/images/close_norm.gif";
closeicon.id = "close";
iconsdiv.appendChild(closeicon);
if(document.all) closeicon.style.cursor = "hand";
else closeicon.style.cursor = "pointer";
addevent(closeicon,"mousedown",changeicon,false);
addevent(closeicon,"mouseout",changeicon,false);
addevent(closeicon,"mouseup",changeicon,false);
addevent(closeicon,"click",closewin,false);






Wyszukiwarka