var Tools = { toggle: function( elm )
{ if ($(elm).getStyle('display') == 'block')
{ $(elm).setStyle('display', 'none');}
else
{ $(elm).setStyle('display', 'block');}
}, toggleElements: function( anchor, elm1, elm2 ) { var tween1 = null; var tween2 = null; tween1 = new Fx.Morph(elm1, {duration: 300, transition: Fx.Transitions.Sine.easeOut}); tween2 = new Fx.Morph(elm2, {duration: 300, transition: Fx.Transitions.Sine.easeOut}); tween1.removeEvents('onComplete'); tween2.removeEvents('onComplete'); if ($(elm1).getStyle('display') == 'none')
{ tween2.start({ 'opacity': 0 }); tween2.addEvent('onComplete', function() { $(elm2).setStyles({ 'display': 'none', 'opacity': 0
}); $(elm1).setStyles({ 'display': 'block', 'opacity': 0
}); tween1.start({ 'opacity': 1 });});}
else
{ if (anchor != null) { anchor.onmouseout = function() { Tools.toggleElements(false, elm1, elm2); anchor.onmouseout = null;}
}
tween1.start({ 'opacity': 0 }); tween1.addEvent('onComplete', function() { $(elm1).setStyles({ 'display': 'none', 'opacity': 0
}); $(elm2).setStyles({ 'display': 'block', 'opacity': 0
}); tween2.start({ 'opacity': 1 });});}
}, replaceTextSidebar: function(text1, text2, color) { var flashvars = {}; flashvars.f_row = text1; flashvars.s_row = text2; flashvars.text_color = color; var params = {}; params.wmode = 'transparent'; var currentTime = new Date(); currentTime = currentTime.getTime(); swfobject.embedSWF("/flash/sidebarh3title.swf?time="+currentTime, "sidebar_title", "190", "40", "8.0.0", "/flash/expressInstall.swf", flashvars, params);}, replaceText: function(element, text1, text2, color, width) { if (width == null) { width = 190;}
var flashvars = {}; flashvars.f_row = text1; flashvars.s_row = text2; flashvars.text_color = color; var params = {}; params.wmode = 'transparent'; var currentTime = new Date(); currentTime = currentTime.getTime(); swfobject.embedSWF("/flash/sidebarh3title.swf?time="+currentTime, element, width, "40", "8.0.0", "/flash/expressInstall.swf", flashvars, params);}, replaceSingleText: function(element, text1, width, color) { var flashvars = {}; flashvars.f_row = text1; flashvars.text_color = color; var params = {}; params.wmode = 'transparent'; var currentTime = new Date(); currentTime = currentTime.getTime(); text1 = text1.replace(/^\s+|\s+$/g, ''); swfobject.embedSWF("/flash/titles_medium.swf?time="+currentTime, element, width, "24", "8.0.0", "/flash/expressInstall.swf", flashvars, params);}, replaceContent: function(url, destination, func) { dataLoader = new Request({url: url}); dataLoader.send(); dataLoader.onSuccess = function( responseText ) { $(destination).empty(); $(destination).set('html', responseText); if (func != null) { func();}
}
}, replaceContentScript: function(url, destination, func) { dataLoader = new Request({ url: url, evalScripts: true
}); dataLoader.send(); dataLoader.onSuccess = function( responseText ) { $(destination).empty(); $(destination).set('html', responseText); if (func != null) { func();}
}
}, replaceTextWithFlash: function(element, text, flash, width, color) { var flashvars = {}; flashvars.f_row = text; flashvars.text_color = color; var params = {}; params.wmode = 'transparent'; var currentTime = new Date(); currentTime = currentTime.getTime(); text = text.replace(/^\s+|\s+$/g, ''); swfobject.embedSWF(flash+"?time="+currentTime, element, width, "18", "8.0.0", "/flash/expressInstall.swf", flashvars, params);}
};