/*----------------------*function for explorebody.asp starts here*------------------------------------*/
var change=true;
var list0=new Array();
var click=0;
var last_list=0;
var gender='m';
var change_img=true;
var mainparts=new Array()
mainparts[1]="Head And Brain"
mainparts[2]="Face And Neck"
mainparts[4]="Chest"
mainparts[3]="Upper Extrimities"
mainparts[5]="Abdomen"
mainparts[6]="Lower Extrimities"

var mpartimage=new Array();
mpartimage[1]="mpart1.jpg"
mpartimage[2]="mpart2.jpg"
mpartimage[3]="mpart3.jpg"
mpartimage[4]="mpart4.jpg"
mpartimage[5]="mpart5.jpg"
mpartimage[6]="mpart6.jpg"


var wpartimage=new Array();
wpartimage[1]="fpart1.jpg"
wpartimage[2]="fpart2.jpg"
wpartimage[3]="fpart3.jpg"
wpartimage[4]="fpart4.jpg"
wpartimage[5]="fpart5.jpg"
wpartimage[6]="fpart6.jpg"

var partdesc=new Array();
partdesc[1]="the part of the body that contains the brain and the organs of sight ,hearing ,smell and taste.<BR>Functions:memory,sight,smell ,taste and hearing,maintaining the equilibrium of the body."
partdesc[2]="This is a very important part as it has the sensory organs like the eye, nose, ear,tongue,and the neck has the important parts which are important for passage of food from mouth to stomach and oxygen from nose to lungs and also has the larynx and tonsils and the thyroid glands."
partdesc[3]="These include the arms.they are two in number and they have ten fingers which have nails at their tip.<BR>Functions-holding,lifting,hitting ,writing ."
partdesc[4]="The part of the body cavity between the neck and the diaphragm is called the chest .In medical terminalogy it is called the thorax .Its contents include the most important parts  the heart which receives the impure blood and sends the pure oxygenated blood to all parts of the body.It also contains  the lungs which is the organ of breathing as well as the organ for purifying the deoxygeneted blood which arrives from heart to lungs.Externally females show the presence of the paired breasts in this region . <BR><br><b>Functions</b><br>1.It contains the vital organs i.e. the heart and the heart. <br>2.These  vital organs  are placed in the rib cage which gives them protection<br><br>Auscaltation which is an important type of examination is done here."
partdesc[5]="The area between the diaphragm and the pelvis which contains the stomach with lower parts of the eosophagus ,small and large intestines ,liver ,gallbladder ,spleen,pancreas,and bladder[also uterus in females]<BR>functions-1.To aphysician no examination os complete without abdominal examination<BR>2.To a gynacologist also abdomianl examination is a must.<BR>3.For a surgeon abdominal surgery that si opening the abdomen is a source of many diagnosis and cure."
partdesc[6]="They include two legs which possess ten fingers with nails.<BR>Function-locomotion, bearing the weight of the body,balancing the body"

var range=new Array();

function loadlistnimg(no) // for displaying list of subparts
	{
		if(typeof(no)=="String")
			no=parseInt(no);
		if((no>0)&&(no<7))
		{
			if(change_img)
			{
				initiatescroller('list',gender+'list'+no,'refresh',297,225,138,170,'#BCCACD','arial','#8386AD',2);
				arrayofimg=eval(gender+"partimage")
			
				if(document.all)
					partimg.innerHTML="<img src='images/"+arrayofimg[no]+"' width=160 height=160>";
				else if(document.layers)
				{
					document.partimg.document.write("<img src='images/"+arrayofimg[no]+"' width=160 height=160>");
					document.partimg.document.close();
				}
			}
			last_list=no;
		}
		else
		{
			if(change_img)
			{
				range[0]=1;
				for(i=1,j=1; j<7; j++)
				{
					obj=eval(gender+"list"+j);
					for(k=1; k<obj.length; k++,i++)
						list0[i]=obj[k];
					range[j]=i;
				}
				initiatescroller('list','list0','refresh',297,225,138,170,'#BCCACD','arial','#8386AD',2);
			
				if(document.all)
					partimg.innerHTML="<img src='images/bodyparts.jpg' width=160 height=160>";
				else if(document.layers)
				{
					document.partimg.document.write("<img src='images/bodyparts.jpg' width=160 height=160>");
					document.partimg.document.close();
				}
			}
			last_list=0;
		}
	}

function lockimg()
{
	if(last_list==3)
		MM_swapImage('man3','','images/man3on.gif','man5','','images/man5on.gif','woman3','','images/woman3on.gif','woman5','','images/woman5on.gif');
	else if(last_list==5)
		MM_swapImage('man6','','images/man6on.gif','woman6','','images/woman6on.gif');
	else if(last_list==6)
		MM_swapImage('man7','','images/man7on.gif','man8','','images/man8on.gif','woman7','','images/woman7on.gif','woman8','','images/woman8on.gif')	
	else
		MM_swapImage('man'+last_list,'','images/man'+last_list+'on.gif','woman'+last_list,'','images/woman'+last_list+'on.gif')
	click=2;
}

function showGender(sex) // for switching between man and woman
	{
		if(document.all)
		{
			if(sex=='w')
			{
				if(FemaleImg.style.visibility=="hidden")
				{
					FemaleImg.style.visibility="visible";
					MaleImg.style.visibility="hidden";
					gender='w';
					loadlistnimg(last_list);
				}
				else
					return;
			}
			else
			{
				if(MaleImg.style.visibility=="hidden")
				{
					MaleImg.style.visibility="visible";
					FemaleImg.style.visibility="hidden";
					gender='m';
					loadlistnimg(last_list);
				}
				else
					return;
			}
		}
		else if(document.layers)
		{
			if(sex=='w')
			{
				if(document.FemaleImg.visibility=="hide")
				{
					document.FemaleImg.visibility="visible";
					document.MaleImg.visibility="hidden";
					gender='w';
					loadlistnimg(last_list);
				}
				else
					return;
			}
			else
			{
				if(document.MaleImg.visibility=="hide")
				{
					document.MaleImg.visibility="visible";
					document.FemaleImg.visibility="hidden";
					gender='m';
					loadlistnimg(last_list);
				}
				else
					return;
			}
		}
		else
			return;
	}

function refresh(num) // to page load again
	{	
		if(last_list==0)
		{
			for(i=1; i<7; i++)
				if(num<range[i])
				{
					last_list=i;
					list_cur=eval(gender+"idlist"+i);
					num=list_cur[num-range[i-1]+1];
					break;
				}
		}
		else
		{
			list_cur=eval(gender+"idlist"+last_list);
			num=list_cur[num];
		}
		window.location.href="./explorebody.asp?part="+num+"&listid="+last_list+"&gender="+gender;
	}
	
function godisease(num) // to call next file
	{	
		obj=eval("Disease");
		disname=obj[num];
		chosmode=open("../temp/chosmode.asp?disid="+num,"chosmod","toolbar=0,location=0,directories=0,menubar=0,resizable=1,width=400,height=500,left=0,top=0")
	}

function show(list_id) //to display list of parts
	{	
		click=1;
		change_img=true;
		loadlistnimg(list_id);
		if(last_list>0)
		{
			if(document.all)
				partname.innerHTML="<center><b><font color='#ffffff' size='2' face='verdana'>"+mainparts[last_list]+"</font></b></center>";
			else if(document.layers)
			{
				document.partname.document.write("<table width=165 cellspacing=0 cellpadding=0><tr><td align='center' width=100%><b><font color='#ffffff' size='2' face='verdana'>"+mainparts[last_list]+"</font></b></td></tr></table>");
				document.partname.document.close();
			}

			initiatescroller('dispdescription','partdesc['+last_list+']','',300,453,455,103,'#BCCACD','arial','#8386AD',2);
		}
	}

function showprofile(index) // for displaying specialist profile
	{
		profile=profiles[index]
		initiatescroller('dispprofile','profile','',480,593,295,135,'#000000','arial','#8386AD',2);
	}
function staticf(id)
	{
		location.href="bodypart.asp?partid="+id
	}
//*------------------------------End of File Explorebody.js--------------------------------------------*/

