var d=""; var m=""; var y=""; var text = ""; var fonts = ""; var generatorColor = ""; // ***************************************************************************************************************** // Shadowbox initialisieren // ***************************************************************************************************************** Shadowbox.init({ overlayColor: "#FF99FF", language: "de-CH", players: ['html'] }); // ***************************************************************************************************************** // PopUp für Geburtsdatum öffnen // ***************************************************************************************************************** function pickBirthdate(){ var content = ''; Shadowbox.open({ player: 'html', content: content, title: 'GEBURTSDATUM EIGEBEN', height: 300, width: 600, options: {enableKeys:false} }); new PeriodicalExecuter(function(pe) { if(d!="" && m!="" && y!="" && $('day')){ showColorPicker(); pe.stop(); } }, 2); } // ***************************************************************************************************************** // ColorPicker einblenden // ***************************************************************************************************************** function showColorPicker(){ if($('day').getValue()!="" && $('month').getValue()!="" && $('year').getValue()!=""){ $('colorPicker').show(); d = $('day').getValue(); m = $('month').getValue(); y = $('year').getValue(); changeBirthdate('','',''); }else{ $('colorPicker').hide(); } } // ***************************************************************************************************************** // Geburtsdatum aktualisieren // ***************************************************************************************************************** function changeBirthdate(color,colorName,close){ if(color && colorName){ $('birthdate').src="/_include/_generator/birthdate/birthdate.php?color="+color+"&day="+$('day').getValue()+"&month="+$('month').getValue()+"&year="+$('year').getValue(); $('generatorDate').value=$('day').getValue()+'.'+$('month').getValue()+'.'+$('year').getValue(); $('generatorColor').value=colorName; generatorColor = color; }else{ $('birthdate').src="/_include/_generator/birthdate/birthdate.php?color="+generatorColor+"&day="+$('day').getValue()+"&month="+$('month').getValue()+"&year="+$('year').getValue(); $('generatorDate').value=$('day').getValue()+'.'+$('month').getValue()+'.'+$('year').getValue(); } if(close){ Shadowbox.close(); } } // ***************************************************************************************************************** // PopUp für Bildauswahl öffnen // ***************************************************************************************************************** function pickPicture(){ var content = ''; Shadowbox.open({ player: 'html', content: content, title: 'BILD/WAPPEN AUSWÄHLEN', height: 450, width: 740, options: {enableKeys:false} }); new PeriodicalExecuter(function(pe) { Scroller.setAll(); Scroller.updateAll(); if($('scroll-handle-container1')) pe.stop(); }, 2); } // ***************************************************************************************************************** // Bild austauschen // ***************************************************************************************************************** function changePicture(picture,title){ $('picture').src="/pub/uploads/generator/big_"+picture; $('generatorPicture').value=title; Shadowbox.close(); } // ***************************************************************************************************************** // PopUp für Text // ***************************************************************************************************************** function pickText(){ var content = ''; Shadowbox.open({ player: 'html', content: content, title: 'NAME/TEXT EIGEBEN', height: 450, width: 740, options: {enableKeys:false} }); new PeriodicalExecuter(function(pe) { Scroller.setAll(); if(text && $('text')){ previewFonts(text); $('text').value=text; } if(fonts) pe.stop(); }, 2); } // ***************************************************************************************************************** // Vorschau der Schriften // ***************************************************************************************************************** function previewFonts(text){ if(text){ fonts = "
SCHRIFTART AUSWäHLEN:
"; fonts += '
'; fonts += '
'; fonts += '
'; fonts += '
'; fonts += '
'; fonts += '
'; fonts += '
'; fonts += '
'; fonts += '
'; fonts += '
'; fonts += '
'; if($('fonts')) $('fonts').update(fonts); } } // ***************************************************************************************************************** // Namen aktualisieren // ***************************************************************************************************************** function changeText(font,fontName){ $('name').src="/_include/_generator/fonts/fonts.php?font="+font+"&text="+$('text').getValue(); text = $('text').getValue(); $('generatorText').value = text; $('generatorFont').value = fontName; Shadowbox.close(); } // ***************************************************************************************************************** // Feldlänge begrenzen // ***************************************************************************************************************** function checkLength(field,max){ if (field.value.length >= max) { field.value=field.value.substring(0,max); field.blur(); } }