
/*##############################################################################
ENCODING : UTF-8
POWERED BY : ⓒ2008 THEPAPER™
--------------------------------------------------------------------------------
[ SVN REVISION INFORMATION ]
$Rev: 158 $
$Date: 2008-07-24 22:26:32 +0900 (목, 24 7월 2008) $
--------------------------------------------------------------------------------
[ FILE DISCRIPTION ]
THEPAPER INTERFACE LIBARY
--------------------------------------------------------------------------------
[ STRUCTURE & REFERENCE ]
REQUIRE : prototype 1.6.0.2 + scriptaculous 1.8.1 + protoTip 2.0.1.3
##############################################################################*/

/*##############################################################################
TPI initalizer
##############################################################################*/
var TPI = {
	path : '/_CORE/LIB/JS.LIB/tpi/1.0.080625/',
	Version : '1.0.080625',
	REQUIRED_PROTOTYPE : '1.6.0.2',
	REQUIRED_SCRIPTACULOUS : '1.8.1',
	REQUIRED_PROTOTIP : '2.0.1.3',
	require : function(libraryName){
	document.write('<script language="javascript" type="text/javascript" src="'+libraryName+'"><\/script>');
	},
	init : function(){
	function convertVersionString(versionString){
		var r = versionString.split('.');
		return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]);
	}
	if(
		(typeof Prototype=='undefined') ||
		(typeof Element == 'undefined') ||
		(typeof Element.Methods=='undefined') ||
		(convertVersionString(Prototype.Version) < convertVersionString(TPI.REQUIRED_PROTOTYPE))
	){
		throw('TPI requires the prototype ' + TPI.REQUIRED_PROTOTYPE);
	}
	if((typeof Scriptaculous=='undefined') || (convertVersionString(Scriptaculous.Version) < convertVersionString(TPI.REQUIRED_SCRIPTACULOUS))){
		throw('TPI requires the Scriptaculous ' + TPI.REQUIRED_SCRIPTACULOUS);
	}
	if((typeof Prototip=='undefined') ||  (convertVersionString(Prototip.Version) < convertVersionString(TPI.REQUIRED_PROTOTIP))){
		throw('TPI requires the Prototip ' + TPI.REQUIRED_PROTOTIP);
	}
	var libz = ['TPI.Utility', 'TPI.Button', 'TPI.Input', 'TPI.File', 'TPI.Select', 'TPI.Checkbox', 'TPI.RadioButton', 'TPI.Switch', 'TPI.RoundBox', 'TPI.ColorPicker'];
	libz.each(function(libz){
		TPI.require(TPI.path+libz+'.js');
	});
  }
}
// TPI Load
TPI.init();
