var templateImages=new Array();
templateImages[126]=new Array("obj_bg.jpg","13234");
templateImages[144]=new Array("header_info_bottom.gif","3744");
templateImages[119]=new Array("header_info_bg.gif","4924");
templateImages[118]=new Array("all_buttons.jpg","13096");
templateImages[138]=new Array("page_footer.jpg","3478");
templateImages[108]=new Array("main_header.jpg","13962");
templateImages[143]=new Array("page_header.jpg","5059");
templateImages[137]=new Array("page_repeat.jpg","599");
templateImages[100]=new Array("contact_link.jpg","659");
templateImages[99]=new Array("home_link.jpg","678");
templateImages[114]=new Array("page_up.jpg","32701");
templateImages[113]=new Array("header.jpg","15749");
templateImages[98]=new Array("bg.jpg","809");
templateImages[146]=new Array("ajax-loader.gif","9427");
templateImages[130]=new Array("form-loader.gif","847");
templateImages[131]=new Array("logo.jpg","13213");
templateImages[145]=new Array("footer-logo.gif","1521");
templateImages[147]=new Array("NEWbg.jpg","538");
templateImages[148]=new Array("NEWfooter.jpg","1885");
templateImages[149]=new Array("NEWheadpage.jpg","7470");
templateImages[150]=new Array("NEWpagerepeat.jpg","452");

var templateTotalImages=21;
var templateLoadedImages=0;
var templateTotalBytes=144045;
var templateTotalBytesLoaded=0;

$(document).ready(function(){
	$("#hideAll").css({"z-index":"1000000","position":"absolute","left":"0px","top":"0px","width":"100%","height":"100%"});
	$("#cViewloader").css({"display":"block","z-index":"10000000","position":"absolute","left":((document.body.clientWidth/2)-60)+"px","top":"200px","width":"120px"});
	$("#progressbar").reportprogress(0,templateTotalBytes);
	$('body').append("<div id='cloader'></div>");
	$('#cloader').css({'position':'absolute','top':'-3000px','width':'0px','height':'1px','overflow':'hidden'});
	$('#cloader').append("<img src='/images/themes/1/obj_bg.jpg' onLoad='templateCheckLoad(126);' onError='alert(126);'/><img src='/images/themes/1/header_info_bottom.gif' onLoad='templateCheckLoad(144);' onError='alert(144);'/><img src='/images/themes/1/header_info_bg.gif' onLoad='templateCheckLoad(119);' onError='alert(119);'/><img src='/images/themes/1/all_buttons.jpg' onLoad='templateCheckLoad(118);' onError='alert(118);'/><img src='/images/themes/1/page_footer.jpg' onLoad='templateCheckLoad(138);' onError='alert(138);'/><img src='/images/themes/1/main_header.jpg' onLoad='templateCheckLoad(108);' onError='alert(108);'/><img src='/images/themes/1/page_header.jpg' onLoad='templateCheckLoad(143);' onError='alert(143);'/><img src='/images/themes/1/page_repeat.jpg' onLoad='templateCheckLoad(137);' onError='alert(137);'/><img src='/images/themes/1/contact_link.jpg' onLoad='templateCheckLoad(100);' onError='alert(100);'/><img src='/images/themes/1/home_link.jpg' onLoad='templateCheckLoad(99);' onError='alert(99);'/><img src='/images/themes/1/page_up.jpg' onLoad='templateCheckLoad(114);' onError='alert(114);'/><img src='/images/themes/1/header.jpg' onLoad='templateCheckLoad(113);' onError='alert(113);'/><img src='/images/themes/1/bg.jpg' onLoad='templateCheckLoad(98);' onError='alert(98);'/><img src='/images/themes/1/ajax-loader.gif' onLoad='templateCheckLoad(146);' onError='alert(146);'/><img src='/images/themes/1/form-loader.gif' onLoad='templateCheckLoad(130);' onError='alert(130);'/><img src='/images/themes/1/logo.jpg' onLoad='templateCheckLoad(131);' onError='alert(131);'/><img src='/images/themes/1/footer-logo.gif' onLoad='templateCheckLoad(145);' onError='alert(145);'/><img src='/images/themes/1/NEWbg.jpg' onLoad='templateCheckLoad(147);' onError='alert(147);'/><img src='/images/themes/1/NEWfooter.jpg' onLoad='templateCheckLoad(148);' onError='alert(148);'/><img src='/images/themes/1/NEWheadpage.jpg' onLoad='templateCheckLoad(149);' onError='alert(149);'/><img src='/images/themes/1/NEWpagerepeat.jpg' onLoad='templateCheckLoad(150);' onError='alert(150);'/>");
});

function templateCheckLoad(id){
	templateLoadedImages+=1;
	templateTotalBytesLoaded+=parseInt(templateImages[id][1]);
	$("#progressbar").reportprogress(templateTotalBytesLoaded,templateTotalBytes);
}
var showStart=0;

								(function($){
								$.fn.reportprogress = function(val,maxVal) {
									var max;
									if(maxVal){
										max=maxVal
									}else{
										max=100;
									}
									var width=Math.round(val/max*100);
									$("#progress").animate({"width":width+"%"},100,function(){
										if((val>=max) && showStart!=1){
											showStart=1;
											$("#cViewloader").fadeOut("fast",function(){
												$("#hideAll").fadeOut("slow",function(){
													show("dent_manager");
												});
											});
										}
										});
								}})(jQuery);
function setAjax(){
$(".text a").attr("rel","noajax");
$(".page a").attr("rel","noajax");
$("#main_menu a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){if($(this).attr("href").split("&jsDynamic:")[1]){	var a=$(this).attr("href").split("&jsDynamic:")[1].replace("(","").replace(")","");	if($.browser.msie){var attrs=a.split("%7C");}else{var attrs=a.split("|");}	var tmp="";	for (var i=0;i<attrs.length;i++){		tmp="&"+attrs[i]+"="+(($(this).attr(attrs[i]))?$(this).attr(attrs[i]):"")+tmp;	}	var href=$(this).attr("href").split("&jsDynamic:")[0]+tmp;	$(this).attr("href",href);}else{	var href=$(this).attr("href");
}$(this).doajax("#main_holder","fadeIn|slow");return false;
						});
}});
$("#header_info a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){if($(this).attr("href").split("&jsDynamic:")[1]){	var a=$(this).attr("href").split("&jsDynamic:")[1].replace("(","").replace(")","");	if($.browser.msie){var attrs=a.split("%7C");}else{var attrs=a.split("|");}	var tmp="";	for (var i=0;i<attrs.length;i++){		tmp="&"+attrs[i]+"="+(($(this).attr(attrs[i]))?$(this).attr(attrs[i]):"")+tmp;	}	var href=$(this).attr("href").split("&jsDynamic:")[0]+tmp;	$(this).attr("href",href);}else{	var href=$(this).attr("href");
}$(this).doajax("#main_holder","fadeIn|slow");return false;
						});
}});
$("#top_menu a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){if($(this).attr("href").split("&jsDynamic:")[1]){	var a=$(this).attr("href").split("&jsDynamic:")[1].replace("(","").replace(")","");	if($.browser.msie){var attrs=a.split("%7C");}else{var attrs=a.split("|");}	var tmp="";	for (var i=0;i<attrs.length;i++){		tmp="&"+attrs[i]+"="+(($(this).attr(attrs[i]))?$(this).attr(attrs[i]):"")+tmp;	}	var href=$(this).attr("href").split("&jsDynamic:")[0]+tmp;	$(this).attr("href",href);}else{	var href=$(this).attr("href");
}$(this).doajax("#main_holder","fadeIn|slow");return false;
						});
}});
$("#buy_dentist_manager a[@rel!=noajax]").each(function(){
if($(this).attr("ajaxSet")!=1){
$(this).attr("ajaxSet",1);
$(this).bind("click",function(){if($(this).attr("href").split("&jsDynamic:")[1]){	var a=$(this).attr("href").split("&jsDynamic:")[1].replace("(","").replace(")","");	if($.browser.msie){var attrs=a.split("%7C");}else{var attrs=a.split("|");}	var tmp="";	for (var i=0;i<attrs.length;i++){		tmp="&"+attrs[i]+"="+(($(this).attr(attrs[i]))?$(this).attr(attrs[i]):"")+tmp;	}	var href=$(this).attr("href").split("&jsDynamic:")[0]+tmp;	$(this).attr("href",href);}else{	var href=$(this).attr("href");
}$(this).doajax("#main_holder","fadeIn|slow");return false;
						});
}});
}