function setCords(e) { x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX; y = (document.all) ? window.event.y + document.body.scrollTop : e.pageY; x -= document.getElementById("renderbuttonImage").offsetLeft; y -= document.getElementById("renderbuttonImage").offsetTop; } function ButtonBoosterPreloader() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hidepage').style.visibility = 'hidden'; } else { if (document.layers) { // Netscape 4 document.hidepage.visibility = 'hidden'; } else { // IE 4 document.all.hidepage.style.visibility = 'hidden'; } } } function MarkValue(markfeld) { document.form1[markfeld].select(); document.form1[markfeld].focus(); } function CopyClipboard(copyfeld) { highlighcode(); textRange = document.form1.message.createTextRange(); textRange.execCommand("RemoveFormat"); textRange.execCommand("Copy"); alert("Der Text wurde in die Zwischenablage kopiert."); } function anzeigen(showPullDownMenu, PulldownFocus, PulldownMenu1_Value, PulldownMenuValue){ if(document.getElementById(showPullDownMenu).style.display=='none') { document.getElementById(showPullDownMenu).style.display='block'; if(PulldownFocus) { document.form1[PulldownFocus].focus(); } } else { if (PulldownMenu1_Value) { document.getElementById(PulldownMenu1_Value).value = PulldownMenuValue; } document.getElementById(showPullDownMenu).style.display='none'; } } function togglediv(id, name, counterdivs) { var divelement = document.getElementById(name+id); for (var i = 1; i<=counterdivs; i++) { if (document.getElementById(name+i)) { document.getElementById(name+i).style.display='none'; } } if (divelement) { if(divelement.style.display='none') { divelement.style.display='block'; } else { divelement.style.display='none'; } } } function closealldiv(name, counterdivs) { for (var i = 1; i<=counterdivs; i++) { if (document.getElementById(name+i)) { document.getElementById(name+i).style.display='none'; } } } function MainPointColorSlideBarOFF() { if(document.getElementById('ColorSlideBar').style.visibility=='visible') { document.getElementById('ColorSlideBar').style.visibility='hidden'; } } function MainPointColorSlideBarON() { if(document.form1['colorsliderstatus'].value=='1') { document.getElementById('ColorSlideBar').style.visibility='visible'; } } function MainPointNavColorSlideBarOFF() { if(document.getElementById('ColorNavSlideBar').style.visibility=='visible') { document.getElementById('ColorNavSlideBar').style.visibility='hidden'; } } function MainPointNavColorSlideBarON() { if(document.form1['colorNavsliderstatus'].value=='1') { document.getElementById('ColorNavSlideBar').style.visibility='visible'; } } function ToggleColorSlideBar() { if(document.getElementById('ColorSlideBar').style.visibility=='hidden') { document.getElementById('ColorSlideBar').style.visibility='visible'; SetPullValue('colorsliderstatus','1') } else { document.getElementById('ColorSlideBar').style.visibility='hidden'; SetPullValue('colorsliderstatus','0') } } function ToggleNavColorSlideBar() { if(document.getElementById('ColorNavSlideBar').style.visibility=='hidden') { document.getElementById('ColorNavSlideBar').style.visibility='visible'; SetPullValue('colorNavsliderstatus','1') } else { document.getElementById('ColorNavSlideBar').style.visibility='hidden'; SetPullValue('colorNavsliderstatus','0') } } document.onmousemove = setCords; function rounding(wert){ // rr gibt an, in welchen Schritten gerundet wird //return Math.round(wert/stellen) * stellen; return Math.round(wert*100)/100; } function getHueValue() { //alert("x: " + x + "\ny: " + y); var huerotation = (x - 51)/368*360; huerotation = rounding(huerotation) SetPullValue('hue',huerotation); } function getSliderHueValue() { var huerotation = (x - 51)/368*360; huerotation = rounding(huerotation) sliderfarbbalken.setValue(huerotation) } function getNavHueValue() { var huerotation = (x - 51)/368*360; huerotation = rounding(huerotation) SetPullValue('Navhue',huerotation); } function getSliderNavHueValue() { var huerotation = (x - 51)/368*360; huerotation = rounding(huerotation) sliderNavfarbbalken.setValue(huerotation) } function SetPullValue(feld, pullvalue) { document.form1[feld].value = pullvalue; } function SetPullIDValue(feld, pullvalue) { document.getElementById(feld).value = pullvalue; } function CopyValue(source, destination, colorfield) { document.form1[destination].value = document.form1[source].value; document.getElementById(colorfield).style.background = document.form1[source].value; } function CheckBox(feld) { if(document.form1[feld].value == 'Y') { document.form1[feld].value = 'N'; document.images[feld].src = 'buttongenerator/images/checkbox_false.gif'; } else { document.form1[feld].value = 'Y'; document.images[feld].src ='buttongenerator/images/checkbox_true.gif'; } } function CheckBoxTrue(feld) { document.form1[feld].value = 'Y'; document.images[feld].src ='buttongenerator/images/checkbox_true.gif'; } function showbuttonstyle(sel) { //document.buttonart.src = "buttongenerator/buttons/" + sel.options[sel.selectedIndex].value; document.buttonart.src = "buttongenerator/buttons/" + sel + ".gif"; } function showfontstyle(sel) { //document.fontart.src = "buttongenerator/fonts/" + sel.options[sel.selectedIndex].value + ".gif"; document.fontart.src = "buttongenerator/fonts/" + sel + ".gif"; } function showiconstyle(sel,fromtemplate,fullname) { //document.iconart.src = "buttongenerator/icons/" + sel.options[sel.selectedIndex].value + ".png"; if(fromtemplate) { document.iconart.src = "icons/" + sel + ".png"; document.getElementById('iconart_fullname').value = fullname; } else { document.iconart.src = "buttongenerator/icons/" + sel + ".png"; } } function showiconstyleprivate(sel,fromtemplate) { if(fromtemplate) { document.iconart.src = "users_icons/" + sel + ".png"; } else { document.iconart.src = "buttongenerator/users_icons/" + sel + ".png"; } } function DisableEnter(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if ((evt.keyCode == 13) && (node.type=="text")) {return false;} } document.onkeypress = DisableEnter; var rendermode; function setbackrendermode() { rendermode = 0; OpenRenderWindows(); } function setrendermode() { rendermode = 1; OpenRenderWindows(); } function disableQualityButton() { var qualval=document.form1.filetype.options[document.form1.filetype.selectedIndex].value; if(qualval == "gif"){ document.form1.jpegquality.disabled=true; } if(qualval == "jpg"){ document.form1.jpegquality.disabled=false; } if(qualval == "png"){ document.form1.jpegquality.disabled=true; } } function disableButton() { var disqualval=document.form1.filetype.value; if(disqualval == "gif"){ document.form1.jpegquality.disabled=true; } if(disqualval == "jpg"){ document.form1.jpegquality.disabled=false; } if(disqualval == "png"){ document.form1.jpegquality.disabled=true; } } function OpenWindows(url, width, height) { xTop = screen.width/2 - (width/2); yTop = screen.height/2 - (height/2); fenster = window.open(url,'tutorialwin','scrollbars=yes,resizable=1,height='+height+',width='+width+',left=' + xTop + ',top=' + yTop + ''); fenster.focus(); } function OpenRenderWindows() { width = 520; height = 300; xTop = screen.width/2 - (width/2); yTop = screen.height/2 - (height/2); //xTop = 20; //yTop = 20; //var val=document.form1.fileaccess.options[document.form1.fileaccess.selectedIndex].value; var val=document.form1.fileaccess.value; if(val == "preview"){ fenster = window.open('','renderwin','scrollbars=yes,resizable=1,height='+height+',width='+width+',left=' + xTop + ',top=' + yTop + ''); fenster.focus(); document.form1.method = "post" document.form1.action = "buttongenerator/render.php"; document.form1.target = "renderwin"; //Wegen dem doppelten submit //document.form1.submit(); return true; } if(val == "download"){ fenster = window.open('','renderwin','scrollbars=yes,resizable=1,height='+height+',width='+width+',left=' + xTop + ',top=' + yTop + ''); document.form1.method = "post" document.form1.action = "buttongenerator/render.php"; document.form1.target = "renderwin"; //Wegen dem doppelten submit //document.form1.submit(); return true; } } function BarOpenRenderWin() { width = 520; height = 300; xTop = screen.width/2 - (width/2); yTop = screen.height/2 - (height/2); var val=document.form1.fileaccess.value; fenster = window.open('','renderwin','scrollbars=yes,resizable=1,height='+height+',width='+width+',left=' + xTop + ',top=' + yTop + ''); fenster.focus(); document.form1.method = "post" document.form1.action = "buttongenerator/render.php"; document.form1.target = "renderwin"; document.form1.submit(); return true; } function SaveRenderSettings() { width = 780; height = 500; xTop = screen.width/2 - (width/2); yTop = screen.height/2 - (height/2); var val=document.form1.fileaccess.value; fenster = window.open('','savewin','scrollbars=yes,resizable=1,height='+height+',width='+width+',left=' + xTop + ',top=' + yTop + ''); fenster.focus(); document.form1.method = "post" document.form1.action = "buttongenerator/save.php"; document.form1.target = "savewin"; document.form1.submit(); return true; } function UploadIcons() { width = 780; height = 500; xTop = screen.width/2 - (width/2); yTop = screen.height/2 - (height/2); var val=document.form1.fileaccess.value; fenster = window.open('','uploadiconswin','scrollbars=yes,resizable=1,height='+height+',width='+width+',left=' + xTop + ',top=' + yTop + ''); fenster.focus(); document.form1.method = "post" document.form1.action = "buttongenerator/upload_icons.php"; document.form1.target = "uploadiconswin"; document.form1.submit(); return true; } function LoadRenderSettings() { width = 780; height = 500; xTop = screen.width/2 - (width/2); yTop = screen.height/2 - (height/2); var val=document.form1.fileaccess.value; fenster = window.open('','loadwin','scrollbars=yes,resizable=1,height='+height+',width='+width+',left=' + xTop + ',top=' + yTop + ''); fenster.focus(); document.form1.method = "post" document.form1.action = "buttongenerator/load.php"; document.form1.target = "loadwin"; document.form1.submit(); return true; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 2) { if ((img = MM_findObj(args[2])) != null && !img.MM_init) { img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src; if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array(); nbArr[nbArr.length] = img; for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = args[i+1]; nbArr[nbArr.length] = img; } } } else if (event == "over") { document.MM_nbOver = nbArr = new Array(); for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1]; nbArr[nbArr.length] = img; } } else if (event == "out" ) { for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; } } else if (event == "down") { if ((nbArr = document[grpName]) != null) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; } document[grpName] = nbArr = new Array(); for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = args[i+1]; nbArr[nbArr.length] = img; } } } function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // --> function MM_showHideLayers() { //v3.0 var i,p,v,obj,args=MM_showHideLayers.arguments; for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2]; if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; } obj.visibility=v; } } function PointerCountAdd(source) { document.form1[source].value = eval(document.form1[source].value + "+" + 1); if (document.form1[source].value == 1) { document.form1['render_nav'].value = 1; MM_showHideLayers('TextOptions_navpoints_header','','show'); } } function PointerCountRemove(source) { if (document.form1[source].value > 1) { document.form1[source].value = eval(document.form1[source].value + "-" + 1); } if (document.form1[source].value == 0) { document.form1['render_nav'].value = ""; MM_showHideLayers('TextOptions_navpoints_header','','hide'); } } function TextOptions_navpoints_showhead(source) { if (document.form1[source].value > 0) { MM_showHideLayers('TextOptions_navpoints_header','','show'); } } function CheckNavigationRender() { if (document.form1['render_points'].value > 0) { SetPullValue('renderbutton','Render'); SetPullValue('render_nav_download','1'); OpenRenderWindows(); document.form1.submit(); } else { alert('You can\'t render and download a navigation without any navigation points. Please add at least one point to the navigation by clicking on the button "Add a new point"'); } } function AddPoint(Filter,Filter1,Filter2) { if (document.form1['render_points'].value < 10) { zero_before = 0; } else { zero_before = ""; } input = document.createElement( 'input' ); input.name = (Filter)+eval(document.form1['render_points'].value + "-" + 1); input.id = "input"; input.type = "button"; input.className = "button"; input.style.width = "40px"; input.value = "#"+zero_before+document.form1['render_points'].value; document.getElementById(Filter+"_add").appendChild(input); input = document.createElement( 'input' ); input.name = (Filter)+eval(document.form1['render_points'].value + "-" + 1); input.id = "input"; input.style.width = "150px"; input.className = "input"; input.onfocus = function () {this.style.backgroundColor = "#FFFFAA";} input.onblur = function () {this.style.backgroundColor = "#EFEFEF";} document.getElementById(Filter+"_add").appendChild(input); input = document.createElement( 'img' ); input.name = (Filter1)+eval(document.form1['render_points'].value + "-" + 1); input.id = "img"; input.style.width = "4px"; input.src = "http://www.buttonboost.com/images/spacer.gif"; document.getElementById(Filter+"_add").appendChild(input); input = document.createElement( 'input' ); input.name = (Filter1)+eval(document.form1['render_points'].value + "-" + 1); input.id = "input"; input.style.width = "150px"; input.className = "input"; input.onfocus = function () {this.style.backgroundColor = "#FFFFAA";} input.onblur = function () {this.style.backgroundColor = "#EFEFEF";} document.getElementById(Filter+"_add").appendChild(input); input = document.createElement( 'img' ); input.name = (Filter1)+eval(document.form1['render_points'].value + "-" + 1); input.id = "img"; input.style.width = "4px"; input.src = "http://www.buttonboost.com/images/spacer.gif"; document.getElementById(Filter+"_add").appendChild(input); select = document.createElement( 'select' ); select.name = (Filter2)+eval(document.form1['render_points'].value + "-" + 1); select.Name = (Filter2)+eval(document.form1['render_points'].value + "-" + 1); select.id = "select"; //select.style.width = "50px"; select.className = "select"; document.getElementById(Filter+"_add").appendChild(select); newOption = document.createElement( 'option' ); newOption.value = ""; newOption.innerText = "None"; newOption.text = "None"; select.appendChild(newOption); newOption = document.createElement( 'option' ); newOption.value = "_blank"; newOption.innerText = "New Window"; newOption.text = "New window"; select.appendChild(newOption); newOption = document.createElement( 'option' ); newOption.value = "_parent"; newOption.innerText = "Parent Frame"; newOption.text = "Parent Frame"; select.appendChild(newOption); newOption = document.createElement( 'option' ); newOption.value = "_self"; newOption.innerText = "Same Frame"; newOption.text = "Same Frame"; select.appendChild(newOption); newOption = document.createElement( 'option' ); newOption.value = "_top"; newOption.innerText = "Whole Page"; newOption.text = "Whole Page"; select.appendChild(newOption); var breakpoint = document.createElement("br"); document.getElementById(Filter+"_add").appendChild(breakpoint); input = document.createElement( 'img' ); input.name = (Filter1)+eval(document.form1['render_points'].value + "-" + 1); input.id = "img"; input.width = "5"; input.src = "http://www.buttonboost.com/images/spacer.gif"; document.getElementById(Filter+"_add").appendChild(input); var breakpoint = document.createElement("br"); document.getElementById(Filter+"_add").appendChild(breakpoint); } function RemovePoint(Filter) { inputs = document.getElementById(Filter+"_add").getElementsByTagName("input"); if (inputs.length > 3) { if (inputs.length > 0) { knoten = inputs[inputs.length-1]; knoten1 = inputs[inputs.length-2]; knoten2 = inputs[inputs.length-3]; document.getElementById(Filter+"_add").removeChild(knoten); document.getElementById(Filter+"_add").removeChild(knoten1); document.getElementById(Filter+"_add").removeChild(knoten2); } imageres = document.getElementById(Filter+"_add").getElementsByTagName("img"); if (imageres.length > 0) { knoten = imageres[imageres.length-1]; knoten1 = imageres[imageres.length-2]; knoten2 = imageres[imageres.length-3]; document.getElementById(Filter+"_add").removeChild(knoten); document.getElementById(Filter+"_add").removeChild(knoten1); document.getElementById(Filter+"_add").removeChild(knoten2); } selector = document.getElementById(Filter+"_add").getElementsByTagName("select"); if (selector.length > 0) { knoten = selector[selector.length-1]; document.getElementById(Filter+"_add").removeChild(knoten); } breaks = document.getElementById(Filter+"_add").getElementsByTagName("br"); if (breaks.length > 0) { breaksremove = breaks[breaks.length-1]; breaksremove1 = breaks[breaks.length-2]; document.getElementById(Filter+"_add").removeChild(breaksremove); document.getElementById(Filter+"_add").removeChild(breaksremove1); } } }