function CacheImages(){
	if (document.images) {
		var imgs=new Array('site_pictures/menu_selected_bcg_new.gif', 'site_pictures/menu_hover_bcg_new.gif', 'site_pictures/menu_shadow.png', 'site_pictures/header_homepage_new_on.png', 'site_pictures/header_letter_new_on.png', 'site_pictures/header_ring_new_on.png','site_pictures/header_sitemap_new_on.png');
		var dummy = new Array();
		for (s in imgs){
			dummy[s] = new Image();
			dummy[s].src = imgs[s];
	  }
	}
}

function jQueryAjaxRequest(targeturl,parameters,resultdiv, ctype){
	$.ajax({
		type: ctype,
		url: targeturl,
		data: parameters,
		contentType: "application/x-www-form-urlencoded",
		dataType: "html",
		success: function(response) {
			$('#'+resultdiv).html(response);
		}
	});
}


  function AjaxRequest(requestType, targetUrl, parameters, resultDiv, startFunc, endFunc, errorFunc, repeatCount){
       if (!repeatCount && repeatCount != 0) repeatCount=2;
       if (startFunc) startFunc();
   $.ajax({
      type: requestType,
      url: targetUrl,
      timeout: 60000, 
      data: parameters,
      contentType: "application/x-www-form-urlencoded",
      dataType: "html",
      success: function(response) {
         $('#'+resultDiv).html(response);
         if (endFunc) endFunc();
      },
                       error: function( objAJAXRequest, strError ){
//                                if (strError == 'timeout'){
                                       if (repeatCount < 0){
                                               if (errorFunc) errorFunc(parameters);
                                       }else{
                                               AjaxRequest(requestType, targetUrl, parameters, resultDiv, startFunc, endFunc, errorFunc, --repeatCount);
                                       }
//                                }else{
//                                        alert(strError);
//                                }
                       }
   });
 }
