var utils = {
	jsConfig:{
		jquery:'/admin/drag/js/jquery.js',
		judge:'/admin/drag/js/kesion.judge.js',
		form:'/admin/drag/js/form.js',
		dragLoad:'/admin/drag/js/kesion.drag.load.js',
		popup:'/ks_inc/popup/js/kesion.popup.js',
		nicescroll:'/ks_inc/jquery.nicescroll.js',
		assembly:'/ks_inc/kesion.assembly.js',
		colorpicker:'/admin/drag/js/colorpicker.js'
	},
	loadJs:function(js){
		for(var i in js){
			document.write('<script src="'+this.jsConfig[js[i]]+'"></script>')
			
		}
	},
	page:function(page){
		page.ready();
		if(page.resize){
			window.onresize = function(){
				page.resize();
			};
		};
		if(page.scroll){
			window.onscroll = function(){
				page.scroll();
			};
		};
		return page;
	},
	getUrlParameter:function(url){ //获取url参数 返回json
		var analysisUrl = location.search;
		if(url){
			analysisUrl = url;
		};
		var parameter = analysisUrl.split('?')[1].split('&'),
			parameterObject = {};
		for(var i in parameter){
			var nodeName = parameter[i].split('=')[0],
				nodeValue = parameter[i].split('=')[1];
			parameterObject[nodeName] = nodeValue;
		}
		return parameterObject;
	}
};

function _id(id){
	return document.getElementById(id);
};
