/* ==============================Admin Functions==============================This Javascript cucumber was pickled by:>> Robin Wallar at See Design>> www.seedesign.ca | robin [at] seedesign.ca------------------------------Written with massive mits on while scraping ice of the screenof my icicle that serves as a monitor. ------------------------------------------------------------Feel free to use this to educateyourself on the wonders of javascript.If you plan on copying something directly please contact us. ------------------------------*/      function load_admin(div, url_in){	height = gebi(div).offsetHeight + 100 + 'px';	var url = url_in + '&height=' + height;	window.location.href = url;}/*ajax tiny mce  start*//*load the editing toolbar */var editors_opened = new Array();var i_editors = 1;/*this will active the tinyMce command and close existing tiny instances*/function edit_text(id){	/*only add to the array of opened  (or in other words existing) divs if hasn't already been opened*/	if(this.editors_opened.indexOf(id)==-1)	{		this.editors_opened[this.i_editors] = id;	}	var len = this.editors_opened.length;	/*use this to close other ones*/		/*close existing elements*/	for(i=1; i<len; i++)	{			if(gebi(this.editors_opened[i])!=null && this.editors_opened[i]!=id)/*only close "real" ones and do no close it if it is the one you are trying to open*/		{			exit_editor(this.editors_opened[i]);		}	}		var edit_id = 'edit_' + id;	show_div(edit_id); /*show the save and exit buttons*/	tinyMCE.execCommand('mceAddControl', false, id); /*instantiate the tiny class on the appropriate div*/	this.i_editors++;}/*submit the form*/function save_text(id){				var edit_id = 'edit_' + id;	gebi(id + '_form').value = tinyMCE.getContent();	gebi('form_id_'+id).submit();}/*exit the form&*/function exit_editor(id){	if(gebi(id)!=null)	{		var edit_id = 'edit_' + id;		hide_div(edit_id); /*hide the save and exit buttons */		tinyMCE.execCommand('mceRemoveControl', false, id);	}}/*ajax tinymce  end *//************************start multiple instances configureations************************//*this will active the tinyMce command and close existing tiny instances*/var several_opened = "";function edit_text_several(id){		gebi('container').style.marginTop = "88px";		if(gebi(this.several_opened)!=null && this.several_opened!=id)/*only close "real" ones and do no close it if it is the one you are trying to open*/	{		exit_editor_several(this.several_opened);	}		var edit_id = 'edit_' + id;	tinyMCE.execCommand('mceAddControl', false, id); /*instantiate the tiny class on the appropriate div*/	this.several_opened = id;}function save_several(id_save, num)/*this will save and submit the form*/{	for(j=1; j<=num; j++)	{		id_app=id_save + j;		gebi('container').style.marginTop = "88px";					tinyMCE.execCommand('mceAddControl', false, id_app); /*instantiate the tiny class on the appropriate div*/		exit_editor_several(id_app);	}	gebi('form_id_'+id_save).submit();}/*exit the form&*/function exit_editor_several(id_close){			if(gebi(id_close)!=null)	{			if(gebi(id_close + '_form')!=null)		{ 			gebi(id_close + '_form').value = tinyMCE.getContent(id_close);			tinyMCE.execCommand('mceRemoveControl', false, id_close);		}	}}/************************end multiple instances configureations************************/