/*
 * TASSM.org
 * Copyright(c) 2008, Cipher Chien / OZ Network.
 * 
 */


Ext.namespace('oz.helper');oz.helper={isAcceptNode:function(dropNodeType,position,acceptRules){var rules,result=false;switch(position){case'above':rules=acceptRules.above;break;case'append':rules=acceptRules.append;break;case'below':rules=acceptRules.below;break;}
Ext.each(rules,function(rule){if(dropNodeType==rule){result=true;}});return result;},isAcceptValue:function(checkValue,acceptValues){var acceptValues,result=false;Ext.each(acceptValues,function(acceptValue){if(checkValue==acceptValue){result=true;}});return result;},renderPagebody:function(){var selector=Ext.query('[class=TemplateMainBlock]');var pagebodyDom=selector[0];var pagebody=Ext.get(pagebodyDom.id);var maxHeight=pagebody.getHeight();var slots=Ext.query('*[class=Slot]');Ext.each(slots,function(slot){if(Ext.get(slot.id).getHeight()>maxHeight){maxHeight=Ext.get(slot.id).getHeight();}});pagebody.setHeight(maxHeight);Ext.each(slots,function(slot){if(Ext.get(slot.id).getHeight()<maxHeight){Ext.get(slot.id).setHeight(maxHeight);}});},gotoPage:function(url,target,winConfigs){if(Ext.isEmpty(target))var target='SELF';if(target=='SELF'){document.location=oz.siteConfig.urlHomePage+url;}else{window.open(url);}}};