function wipSkolebenkHttpAjaxSuccess (t, statusDiv) {

   }
   function wipSkolebenkHttpAjaxError (t) {
     alert(' Error ' + t.status + ' -- ' + t.statusText );
     //$(imgPseudo).src = '/champNonValide.gif';
   }

   function wipSkolebenkHttpAjaxError404 (t) {
     alert('Error ' + t.status + ' -- ' + t.statusText);
     //$(imgPseudo).src = '/champNonValide.gif';
   }

   function wipSkolebenk (queryString, htmlDiv, page, method) {
     if (!page) {
       page = 'show';
     }
     var myUrls = new Array();
     myUrls['show']                           = '/wip4/ajax/show.epl';
     myUrls['user_image_map']                 = '/wip4/ajax/user_image_map.epl';

     myUrls['community_group_add']            = '/wip4/ajax/community_group_add.epl';
     myUrls['community_group_add_10']         = '/wip4/ajax/community_group_add_10.epl';
     myUrls['community_group_add_10_v2']      = '/wip4/ajax/community_group_add_10_v2.epl';
     myUrls['community_group_choose']         = '/wip4/ajax/community_group_choose.epl';
     myUrls['community_group_choose_10']      = '/wip4/ajax/community_group_choose_10.epl';
     myUrls['community_group_choose_10_v2']   = '/wip4/ajax/community_group_choose_10_v2.epl';
     myUrls['community_group_choose_10_v3']   = '/wip4/ajax/community_group_choose_10_v3.epl';
     myUrls['community_group_choose_10_2']   = '/wip4/ajax/community_group_choose_10_2.epl';
     myUrls['community_group_choose_year_book'] = '/wip4/ajax/community_group_choose_year_book.epl';

     myUrls['community_group_show_members']   = '/wip4/ajax/community_group_show_members.epl';


     myUrls['community_group_join']           = '/wip4/ajax/community_group_join.epl';
     myUrls['community_group_leave']          = '/wip4/ajax/community_group_leave.epl';
     myUrls['community_group_invite']         = '/wip4/ajax/community_group_invite.epl';
     myUrls['community_group_user_image_add'] = '/wip4/ajax/community_group_user_image_add.epl';

     myUrls['attachment_add_upload']          = '/wip4/ajax/attachment_add_upload.epl';
     myUrls['attachment_add_choose']          = '/wip4/ajax/attachment_add_choose.epl';
     myUrls['attachment_add_added']           = '/wip4/ajax/attachment_add_added.epl';


     myUrls['community_group_image_add']      = '/wip4/ajax/community_group_image_add.epl';
     myUrls['community_group_google_map_add_coords'] = '/wip4/ajax/community_group_map_add_coords.epl';


     myUrls['person_profile_frontpage']       = '/wip4/ajax/person_profile_frontpage.epl';
     myUrls['person_profile_frontpage_v2']       = '/wip4/ajax/person_profile_frontpage_v2.epl';

     myUrls['community_friend_list']          = '/wip4/ajax/community_friend_list.epl';
     //myUrls['community_']                     = '/wip4/ajax/community_.epl';

     myUrls['media_videoplayer']              = '/wip4/ajax/media_videoplayer.epl';
     myUrls['media_videoarkiv']               = '/wip4/ajax/media_videoarkiv.epl';
     myUrls['media_videoarkiv_v2']               = '/wip4/ajax/media_videoarkiv_v2.epl';
     myUrls['media_klassebilder']               = '/wip4/ajax/media_klassebilder.epl';
     myUrls['media_year_range']               = '/wip4/ajax/media_year_range.epl';

     myUrls['group_list_google_map']          = '/wip4/ajax/group_list_google_map.epl';
     myUrls['right_person_profile']           = '/wip4/ajax/right_person_profile.epl';
     myUrls['right_person_profile_v2']           = '/wip4/ajax/right_person_profile_v2.epl';

     myUrls['friend_confirm']                 = '/wip4/ajax/friend_confirm.epl';

     var url = myUrls[page];
     var status = document.getElementById(htmlDiv + 'status');
     if (status) {
       status.style.display = 'inline';
     }
     if (!method) {
       new Ajax.Updater(
			htmlDiv, url + '?' + queryString, {
							   onComplete:function(){
										},
							   asynchronous: true,
							   evalScripts: true,
							   method: 'get',
							   on404: wipSkolebenkHttpAjaxError404,
							   onSuccess: wipSkolebenkHttpAjaxSuccess,
							   onFailure: wipSkolebenkHttpAjaxError
							  }
		       );
     } else {
       new Ajax.Updater(
			htmlDiv, url, {
				       onComplete:function(){
							    },
				       asynchronous: true,
				       evalScripts: true,
				       method: 'post',
				       parameters: '',
				       postBody: queryString,
				       on404: wipSkolebenkHttpAjaxError404,
				       onSuccess: wipSkolebenkHttpAjaxSuccess,
				       onFailure: wipSkolebenkHttpAjaxError
				      }
		       );
     }
   }





   // Login stuff
   function wipLoginLogin (queryString, htmlDiv) {
     var status = document.getElementById(htmlDiv + 'status');
     if (status) {
       status.style.display = 'inline';
     }
     new Ajax.Updater(htmlDiv, '/tools/wip_v4/ajax/login/login.epl?' + queryString, {
						     onComplete:function(){
									   new Effect.Highlight(htmlDiv, {
													  duration: 0.5
													 }
											       );
									  },
						     asynchronous: true,
						     evalScripts: true,
						     method: 'get',
						     on404: wipSkolebenkHttpAjaxError404,
						     onSuccess: wipSkolebenkHttpAjaxSuccess,
						     onFailure: wipSkolebenkHttpAjaxError
						    });
   }

   function wipLoginRegister (queryString, htmlDiv) {
     var status = document.getElementById(htmlDiv + 'status');
     if (status) {
       status.style.display = 'inline';
     }
     new Ajax.Updater(htmlDiv, '/tools/wip_v4/ajax/login/register.epl?' + queryString, {
						     onComplete:function(){
									   new Effect.Highlight(htmlDiv, {
													  duration: 0.5
													 }
											       );
									  },
						     asynchronous: true,
						     evalScripts: true,
						     method: 'get',
						     on404: wipSkolebenkHttpAjaxError404,
						     onSuccess: wipSkolebenkHttpAjaxSuccess,
						     onFailure: wipSkolebenkHttpAjaxError
						    });
   }


   function wipLoginActivate (queryString, htmlDiv) {
     var status = document.getElementById(htmlDiv + 'status');
     if (status) {
       status.style.display = 'inline';
     }
     new Ajax.Updater(htmlDiv, '/tools/wip_v4/ajax/login/activate.epl?' + queryString, {
						     onComplete:function(){
									   new Effect.Highlight(htmlDiv, {
													  duration: 0.5
													 }
											       );
									  },
						     asynchronous: true,
						     evalScripts: true,
						     method: 'get',
						     on404: wipSkolebenkHttpAjaxError404,
						     onSuccess: wipSkolebenkHttpAjaxSuccess,
						     onFailure: wipSkolebenkHttpAjaxError
						    });
   }


   function skolebenken_get_login_unique () {
     var cookie = readCookie('WiP_Login_Ticket');
     var user = '';
     try {
       if (cookie != 'undefined' && cookie != '') {
         var array = cookie.split("&");
         user = array[1];
       }
     } catch (e) { }
     return user;
   }



