function emptyNode ( nodeID ){if( YAHOO.lang.isValue( nodeID ) ){var node = YAHOO.util.Dom.get( nodeID );if( YAHOO.lang.isValue( node ) && node.hasChildNodes() ){while( node.childNodes.length >= 1 ){node.removeChild( node.firstChild );} } }};function sn(el,domAttributes,styleAttributes){if(!el) {return;} var i;if(domAttributes){for(i in domAttributes){var domAttribute = domAttributes[i];if( YAHOO.lang.isFunction(domAttribute) ){continue;} if(i=="className"){i="class";el.className=domAttribute;} if(domAttribute!==el.getAttribute(i)){try{if(domAttribute===false){el.removeAttribute(i);}else{el.setAttribute(i,domAttribute);} } catch(err){ } } } } if(styleAttributes){for(i in styleAttributes){if( lang.isFunction(styleAttributes[i]) ){continue;} if(el.style[i]!=styleAttributes[i]){el.style[i]=styleAttributes[i];} } }} function cn(tag, domAttributes, styleAttributes, innerHTML) {if (tag == 'input' && YAHOO.env.ua.ie) { var strDom = '<' + tag;if (domAttributes!=='undefined'){for (var k in domAttributes){strDom += ' ' + (k === "className" ? "class" : k) + '="' + domAttributes[k] + '"';} } strDom += '/' + '>';return document.createElement(strDom);} else {var el = document.createElement(tag);this.sn(el, domAttributes, styleAttributes);if (innerHTML) {el.innerHTML = innerHTML;} return el;}} function editorPhotos(){editorPhotoFix('imageLeftS');editorPhotoFix('imageRightS');editorPhotoFix('imageLeftL');editorPhotoFix('imageRightL');}function editorPhotoFix(classID){thisSize = YAHOO.util.Dom.getElementsByClassName(classID,"img");for(var i=0;i<thisSize.length;i++){var thisID = YAHOO.util.Dom.generateId(thisSize[i], classID+"-"); var thisImage = YAHOO.util.Dom.get(thisID);var newImage = document.createElement('span');YAHOO.util.Dom.addClass(newImage, classID);YAHOO.util.Dom.setStyle(newImage,"backgroundImage","url("+thisImage.getAttribute("src")+")");var newCover = document.createElement('span');YAHOO.util.Dom.addClass(newCover, classID+"Cover");newImage.appendChild(newCover);YAHOO.util.Dom.insertBefore(newImage, thisImage);thisImage.parentNode.removeChild(thisImage);}} function addListener(element, type, expression, bubbling){bubbling = bubbling || false;if(window.addEventListener){ element.addEventListener(type, expression, bubbling);return true;} else if(window.attachEvent) { element.attachEvent('on' + type, expression);return true;} else return false;} var ImageLoader = function(url){this.url = url;this.image = null;this.loadEvent = null;};ImageLoader.prototype = {load:function(){this.image = document.createElement('img');var url = this.url;var image = this.image;var loadEvent = this.loadEvent;addListener(this.image, 'load', function(e){if(loadEvent != null){loadEvent(url, image);} }, false);this.image.src = this.url;}, getImage:function(){return this.image;}};
