

	var Name
	var newWindow

	var Fetotal = 0
	var Fitotal = 0
	var Netotal = 0
	var Nitotal = 0
	var Setotal = 0
	var Sitotal = 0
	var Tetotal = 0
	var Titotal = 0

function startup() {
	document.forms[0].version.value = document.forms[0].version.value +
		navigator.appName + ", " + navigator.userAgent + ", " +
		navigator.appVersion + ", " + navigator.appCodeName
	}

function ptest() {

	document.forms[0].result.value = ""

Fetotal = sc("FeTi1") + sc("FeTi2") +
			sc("FeTi3") + sc("FeTi4") +
			sc("FeTi5") 

Fitotal = sc("FiTe1") + sc("FiTe2") +
			sc("FiTe3") + sc("FiTe4") +
			sc("FiTe5") 

Netotal = sc("NeSi1") + sc("NeSi2") +
			sc("NeSi3") + sc("NeSi4") +
			sc("NeSi5") 

Nitotal = sc("NiSe1") + sc("NiSe2") +
			sc("NiSe3") + sc("NiSe4") +
			sc("NiSe5") 

Setotal = 35 - Nitotal

Sitotal = 35 - Netotal

Tetotal = 35 - Fitotal

Titotal = 35 - Fetotal

smallest = Fetotal
if ( Fitotal < smallest ) { smallest = Fitotal }
if ( Netotal < smallest ) { smallest = Netotal }
if ( Nitotal < smallest ) { smallest = Nitotal }
if ( Setotal < smallest ) { smallest = Setotal }
if ( Sitotal < smallest ) { smallest = Sitotal }
if ( Tetotal < smallest ) { smallest = Tetotal }
if ( Titotal < smallest ) { smallest = Titotal }
Fetotal = Fetotal - smallest
Fitotal = Fitotal - smallest
Netotal = Netotal - smallest
Nitotal = Nitotal - smallest
Setotal = Setotal - smallest
Sitotal = Sitotal - smallest
Tetotal = Tetotal - smallest
Titotal = Titotal - smallest

total = Fetotal + Fitotal + Netotal + Nitotal + Setotal + Sitotal + Tetotal + Titotal

dom = 10 ;
aux = 3 ;
auxo = 2 ;
inf = -1 ;

istj = Sitotal * dom + Tetotal * aux + Titotal * auxo + Netotal * inf ;
isfj = Sitotal * dom + Fetotal * aux + Fitotal * auxo + Netotal * inf ;
intj = Nitotal * dom + Tetotal * aux + Titotal * auxo + Setotal * inf ;
infj = Nitotal * dom + Fetotal * aux + Fitotal * auxo + Setotal * inf ;
istp = Titotal * dom + Setotal * aux + Sitotal * auxo + Fetotal * inf ;
intp = Titotal * dom + Netotal * aux + Nitotal * auxo + Fetotal * inf ;
isfp = Fitotal * dom + Setotal * aux + Sitotal * auxo + Tetotal * inf ;
infp = Fitotal * dom + Netotal * aux + Nitotal * auxo + Tetotal * inf ;
estj = Tetotal * dom + Sitotal * aux + Setotal * auxo + Fitotal * inf ;
entj = Tetotal * dom + Nitotal * aux + Netotal * auxo + Fitotal * inf ;
esfj = Fetotal * dom + Sitotal * aux + Setotal * auxo + Titotal * inf ;
enfj = Fetotal * dom + Nitotal * aux + Netotal * auxo + Titotal * inf ;
estp = Setotal * dom + Titotal * aux + Tetotal * auxo + Nitotal * inf ;
esfp = Setotal * dom + Fitotal * aux + Fetotal * auxo + Nitotal * inf ;
entp = Netotal * dom + Titotal * aux + Tetotal * auxo + Sitotal * inf ;
enfp = Netotal * dom + Fitotal * aux + Fetotal * auxo + Sitotal * inf ;

type = "ISTJ"; role = "Curator"
typescore = istj

if (isfj > typescore) 
   {type = "ISFJ" ; role = "Curator"
	typescore = isfj}
if (intj > typescore)
   {type = "INTJ" ; role = "Innovator"
    typescore = intj}
if (infj > typescore)
   {type = "INFJ" ; role = "Innovator"
    typescore = infj}
if (isfp > typescore)
   {type = "ISFP" ; role = "Crusader"
    typescore = isfp}
if (infp > typescore)
   {type = "INFP" ; role = "Crusader"
    typescore = infp}
if (istp > typescore)
   {type = "ISTP" ; role = "Scientist"
    typescore = istp}
if (intp > typescore)
   {type = "INTP" ; role = "Scientist"
    typescore = intp}
if (estj > typescore)
   {type = "ESTJ" ; role = "Conductor"
    typescore = estj}
if (esfj > typescore)
   {type = "ESFJ" ; role = "Coach"
    typescore = esfj}
if (entj > typescore)
   {type = "ENTJ" ; role = "Conductor"
    typescore = entj}
if (enfj > typescore)
   {type = "ENFJ" ; role = "Coach"
    typescore = enfj}
if (esfp > typescore)
   {type = "ESFP" ; role = "Sculptor"
    typescore = esfp}
if (enfp > typescore)
   {type = "ENFP" ; role = "Explorer"
    typescore = enfp}
if (estp > typescore)
   {type = "ESTP" ; role = "Sculptor"
    typescore = estp}
if (entp > typescore)
   {type = "ENTP" ; role = "Explorer"
    typescore = entp} ;

document.forms[0].answer.value = type + ", " + Fetotal + ", " +
	Fitotal + ", " + Netotal + ", " + Nitotal + ", " + Setotal + ", " +
	Sitotal + ", " + Tetotal + ", " + Titotal ;
	
	

	clear("FeTi1") ; clear("FeTi2") ; clear("FeTi3") ; clear("FeTi4") ; clear("FeTi5") 
	clear("FiTe1") ; clear("FiTe2") ; clear("FiTe3") ; clear("FiTe4") ; clear("FiTe5")
    clear("NeSi1") ; clear("NeSi2") ; clear("NeSi3") ; clear("NeSi4") ; clear("NeSi5")
	clear("NiSe1") ; clear("NiSe2") ; clear("NiSe3") ; clear("NiSe4") ; clear("NiSe5") 
   

newWindow = window.open( "","results","menubar,scrollbars,toolbar,status,location=yes,resizable,height=350,width=625")

	

newWindow.document.write("<HTML><TITLE>PT-results</TITLE>" +

"<HTML>" +
"<HEAD>" +

"</HEAD>" +
"<body bgcolor='#FFFFFF' text='#000000' leftMargin=0 topMargin=0>" + 



"<table cellspacing=0 cellpadding=0 width=600 border=0>" + 
  "<tr>" + 
    "<td width=170   bgcolor=#660066><br>&nbsp" + 
      
   
        
      
      "<table cellspacing=0 cellpadding=0 width=100% border=0>" + 
        "<tr bgcolor=#ff9933>" +  
          "<td height=1><img height=1" +  
            "src=../images/p.gif" +  
            "width=1></td>" + 
        "</tr>" + 
      "</table>" + 
    "</td>" + 
	
	
    "<td valign=bottom align=center width=430><br><font " +  
      "face=Verdana, Arial, Helvetica, sans-serif size=3 color=#660066 ><b>" +  
      "Christopher J. Coulson, MAHPP</b></font>" +  
      "<table cellspacing=0 cellpadding=0 width=100% border=0>" + 
        "<tbody>" +  
        "<tr bgcolor=#ff9933 height=1>" +  
          "<td><img height=1" +  
            "src=../images/p.gif" +  
            "width=1></td>" + 
        "</tr>" + 
        "</tbody>" +  
      "</table>" + 
    "</td>" +  
  "</tr>" + 
  "<tr>" + 
    "<td  width=170 height=30 bgcolor='#660066' ></td>" + 
	
    "<td valign=top  width=430>" +  
      "<div align=center> <font " +  
      "face=Verdana, Arial, Helvetica, sans-serif size=2 color=#660066 ><b>Here " +  
        "is your DLC Personality Type</b></font></div>" + 
    "</td>" + 
  "</tr>" + 
"</table>" + 
"<table cellspacing=0 cellpadding=0 width=600 border=0>" + 
  "<tr>" +  
    "<td width=170 valign=TOP bgcolor=#660066> " +  

	
    "<td width=430  valign='top' align=center bgcolor='#00FFFF'>" +  
	  "<h3> <FONT face= Verdana, Arial, Helvetica, sans-serif color=#660066 size=2><B>" +  
       "Your Predominant Personality Type is: </b></font><b>" + type + "</b>.</h3>" + 
    
      
	"<b><font face= Verdana, Arial, Helvetica, sans-serif color=#660066 size=2 color=red>" +
	"Your scores for " +
	"each type are shown below. " +
	"Click the relevant squares to learn about your type and those close to it. </font></b><p>" + 
	"<b><font color=red> Print this page to keep your results. </font></b>" +
	"<b><font face= Verdana, Arial, Helvetica, sans-serif color=#660066 size=2 color=#000000>" +
	"This model is dynamic and aims at representing the movement of your inner world. Ring your " + 
              "highest four scores to see where your personality type lies in the overall " + 
              "context of sensing/intuitive, thinking/feeling, introvert/extravert, judging/perceiving. </font> <p>" +
			  
	
	 "<table align=center width=70% border=0 cellspacing=4 cellpadding=4 bordercolor=#999999 bgcolor=#FFCC66 name=16 types>" +
      "<tr bgcolor=lightgrey align=center>" + 
	"<td align=center><a href=istj.htm>ISTJ</a><br>" + istj + "</td>" +
	"<td align=center><a href=isfj.htm>ISFJ</a><br>" + isfj + "</td>" +
	"<td align=center><a href=infj.htm>INFJ</a><br>" + infj + "</td>" +
	"<td align=center><a href=intj.htm>INTJ</a><br>" + intj + "</td></tr>" +
	
	"<tr bgcolor=white align=center> " + 
	"<td align=center><a href=istp.htm>ISTP</a><br>" + istp + "</td>" +
	"<td align=center><a href=isfp.htm>ISFP</a><br>" + isfp + "</td>" +
	"<td align=center><a href=infp.htm>INFP</a><br>" + infp + "</td>" +
	"<td align=center><a href=intp.htm>INTP</a><br>" + intp + "</td></tr>" +
	
	"<tr bgcolor=lightgrey align=center> " + 
	"<td align=center><a href=estp.htm>ESTP</a><br>" + estp + "</td>" +
	"<td align=center><a href=esfp.htm>ESFP</a><br>" + esfp + "</td>" +
	"<td align=center><a href=enfp.htm>ENFP</a><br>" + enfp + "</td>" +
	"<td align=center><a href=entp.htm>ENTP</a><br>" + entp + "</td></tr>" +
	
	"<tr bgcolor=white align=center> " + 
	"<td align=center><a href=estj.htm>ESTJ</a><br>" + estj + "</td>" +
	"<td align=center><a href=esfj.htm>ESFJ</a><br>" + esfj + "</td>" +
	"<td align=center><a href=enfj.htm>ENFJ<br></a>" + enfj + "</td>" +
	"<td align=center><a href=entj.htm>ENTJ</a><br>" + entj + "</td>" +
	"</tr></table>" +
	
	
	
     "<p>I would be grateful if you would send me your results so I might assess the validity of this questionnaire. " +
	"To do this, simply enter your email address and " +
	
	"press the button. Thank you.</p>" + 
	
	







"<form ACTION = http://www.santafecoach.com/cgi-bin/formmail/formmail.pl METHOD = POST>"  +
"<INPUT TYPE=hidden NAME=subject VALUE='DLC_Ptest_Results'>" +
"<input type=hidden name=recipient value=Christopher@santafecoach.com>"  +
"<p align=center><font face=Verdana, Arial, Helvetica, sans-serif><strong><font size=2>" +
                   
                    "<font size=2><strong>E-Mail Address</strong></font><br>" +
                    "<input type=text name=email  maxlength=45 size=45></font></p>" +
					 "<INPUT TYPE=hidden NAME=redirect VALUE=http://www.santafecoach.com/Ptest/resultsthanks.htm>" +
                "<INPUT TYPE=hidden NAME=required VALUE=email>" +
                   
              
"<input type=hidden name=Personality_type value=" + type + ">" +
"<input type=hidden name=enfj value=" + enfj + ">" +
"<input type=hidden name=enfp value=" + enfp + ">" +
"<input type=hidden name=entj value=" + entj + ">" +
"<input type=hidden name=entp value=" + entp + ">" +
"<input type=hidden name=esfj value=" + esfj + ">" +
"<input type=hidden name=esfp value=" + esfp + ">" +
"<input type=hidden name=estj value=" + estj + ">" +
"<input type=hidden name=estp value=" + estp + ">" +
"<input type=hidden name=infj value=" + infj + ">" +
"<input type=hidden name=infp value=" + infp + ">" +
"<input type=hidden name=intj value=" + intj + ">" +
"<input type=hidden name=intp value=" + intp + ">" +
"<input type=hidden name=isfj value=" + isfj + ">" +
"<input type=hidden name=isfp value=" + isfp + ">" +
"<input type=hidden name=istj value=" + istj + ">" +
"<input type=hidden name=istp value=" + istp + ">" +
"<input type=hidden name=fe value=" + Fetotal + ">" +
"<input type=hidden name=fi value=" + Fitotal + ">" +
"<input type=hidden name=se value=" + Setotal + ">" +
"<input type=hidden name=si value=" + Sitotal + ">" +
"<input type=hidden name=ne value=" + Netotal + ">" +
"<input type=hidden name=ni value=" + Nitotal + ">" +
"<input type=hidden name=te value=" + Tetotal + ">" +
"<input type=hidden name=ti value=" + Titotal + ">" +

	
"<input type=submit value='Press to submit the results'>" +
"</center>" +
"</form>" +
	
		"<table width=70% border=0 valign=TOP>" +
          "<tr>" + 
            "<td valign=TOP bgcolor=#CCCCCC> " +
              
	"<h4><b><center>www.santafecoach.com<br>" +
	

	
	"</center> </p>" +
              
            "</td>" +
          "</tr>" +
        "</table></td>" +
	
	
	
	
	

	"</BODY> </HTML>")  +
	
	newWindow.document.close()
	newWindow.focus()
	return true
}


function sc( item ) {	

    score = 0
	eval( "if ( document.forms[0]." + item + "[0].checked == true ) { score = 6 }" )
	eval( "if ( document.forms[0]." + item + "[1].checked == true ) { score = 5 }" )
	eval( "if ( document.forms[0]." + item + "[2].checked == true ) { score = 4 }" )
	eval( "if ( document.forms[0]." + item + "[3].checked == true ) { score = 3 }" )
	eval( "if ( document.forms[0]." + item + "[4].checked == true ) { score = 2 }" )
	eval( "if ( document.forms[0]." + item + "[5].checked == true ) { score = 1 }" )
	eval( "if ( document.forms[0].order" + item + 
			".value == 1 ) { score = 7 - score }" )
	eval( "document.forms[0].result.value = document.forms[0].result.value + " +
		"':' + '" + item + "' + ':' + " + score )
    uncheck(item)
	return eval(score)
}

function append(item){

	eval( "document.forms[0].result.value = document.forms[0].result.value + ':' + '" +
		item + 
		"' + ':' + document.forms[0]." +
		item +
		".value")
	eval( "document.forms[0]." +
		item + 
		".value = ''")
}

function clear( item ) {
	eval( "document.forms[0].order" + item + ".value = ''" )
}

function uncheck( item ) {
	eval( "document.forms[0]." + item + "[0].checked = false " )
	eval( "document.forms[0]." + item + "[1].checked = false " )
	eval( "document.forms[0]." + item + "[2].checked = false " )
	eval( "document.forms[0]." + item + "[3].checked = false " )
	eval( "document.forms[0]." + item + "[4].checked = false " )
	eval( "document.forms[0]." + item + "[5].checked = false " )
}


function right(e) {
  if(navigator.appName=='Netscape' && (e.which==3 || e.which==2)) {
    alert("Right-clicking is disabled on this page.");
    return false;
  } else if(navigator.appName=='Microsoft Internet Explorer' && (event.button==2 || event.button==3)) {
    alert("Right-clicking is disabled on this page.");
    return false;
  }
  return true;
}

document.onmousedown=right;
if(document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;


