// JavaScript Document
 var myIDs = new Array()
 var myPages = new Array()
 myPages[0]="APC";
 myPages[1]="APEC";
 myPages[2]="NAPSAC";
 myPages[3]="FAQ";
 myPages[4]="EXAM";

 myIDs[0]="smenu2";
 myIDs[1]="smenu3";
 myIDs[2]="smenu5";
 myIDs[3]="smenu6";
 myIDs[4]="smenu4";

 var countLoads=0;
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}

if (countLoads==0){expandMenueForThisPage()}

countLoads++;

}
function insertTopMenuLinks(){

	strContent="	  <div id=\"slidemenu\" class=\"slidetabsmenu\"> "
    strContent+="                     <ul>"
    strContent+="                        <li><a href=\"APC_council.html#APC\" title=\"About Us\" rel=\"dropmenu1_b\"><span>About Us</span></a></li>"
    strContent+="                        <li><a href=\"APC_examining.html#APC\" title=\"Examinations\" rel=\"dropmenu2_c\"><span>Examinations</span</a></li>"
    strContent+="                        <li><a href=\"accreditation_intro.html#APC\" title=\"Accreditation\" rel=\"dropmenu2_d\"><span>Accreditation</span></a></li>"
    strContent+="                     </ul>"
    strContent+="                    </div>"
    strContent+="                    <br style=\"clear: left;\"> <br class=\"IEonlybr\"> "
    strContent+="					<div id=\"dropmenu1_b\" class=\"dropmenudiv_c\" style=\"width: 160px;\">"
    strContent+="                      <a href=\"APC_contactdetails.html\">Contact Details</a>" 
    strContent+="                      <a href=\"APC_council.html\">Council</a> "
    strContent+="					   <a href=\"APC_councilstaff.html\">Council Staff</a> "
    strContent+="					   <a href=\"APC_mediareleases.html\">Media Releases</a> "
    strContent+="					   <a href=\"APC_policies.html\">Policies</a> "

    strContent+="						<a href=\"APC_publications.html\">Publications</a> "
	strContent+="						<a href=\"APC_employment.html\">Job Opportunities</a> "
    strContent+="					 </div>"
    strContent+="                    <div id=\"dropmenu2_c\" class=\"dropmenudiv_c\" style=\"width: 300px;\"> "
    strContent+="                      <a href=\"APC_examining.html\">About the Examining Committee</a> 	"
   strContent+="                      <a href=\"examining_interns.html\">Written Examination for interns in &nbsp;Australia</a> 	"
      strContent+="                      <a href=\"examining_streamA.html\">Stream A Applicants</a> 	"
    strContent+="                      <a href=\"examining_streamB.html\">Stream B Applicants</a> 	"
    strContent+="                      <a href=\"examining_trained.html\">Australian and New Zealand Trained &nbsp;Applicants</a> 	"
    strContent+="                      <a href=\"examining_sittingexams.html\">Candidates Sitting APC Exams for &nbsp;Other Countries</a> 	"
    strContent+="                      <a href=\"examining_forms.html\">Forms</a> 	"
    strContent+="                      <a href=\"examining_feeschedule.html\">Fee Schedule</a> 	"
    strContent+="                      <a href=\"examining_members.html\">Examining Committee Members</a> 	"
    strContent+="					</div>"
    strContent+="					<div id=\"dropmenu2_d\" class=\"dropmenudiv_c\" style=\"width: 300px;\"> "
    strContent+="					  <a href=\"accreditation_intro.html\">About the Accreditation Committee</a> "
	strContent+="					  <a href=\"accreditation_accreditationcriteria.html\">Accreditation Criteria, Guidelines and &nbsp;Procedures</a> "
    strContent+="					  <a href=\"accreditation_accreditatedpharmacyschools.html\">Accredited Pharmacy Schools</a>"
    strContent+="                      <a href=\"accreditation_committee.html\">Accreditation Committee Members</a> "				  
    strContent+="                      <a href=\"APAC_authorisationprocess.html\">Authorisation to Accredit CPD &nbsp;Providers Process</em></a> 	"				  
    strContent+="                      <a href=\"accreditation_ITP.html\">Intern Training Program &nbsp;Accreditation</em></a> 	"
    strContent+="					</div>"
	
	document.getElementById("TOP_MENU").innerHTML=strContent
//alert(strContent)

}
/////////////////////
function montre2(id) {
  alert(document.location)
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}

	}
if (d) {d.style.display='block';}
}
////////////////////////
function insertSideMenuLinks(){
strOutput="		     <div id=\"Layer1\"> "
strOutput+="                        <dl id=\"menu\">"
strOutput+="                           <dt onClick=\"javascript:montre('smenu2');\"><a href=\"APC_whatsnew.html#APC\">Whats New</a> "
strOutput+="                           <dd id=\"smenu2\"> "
strOutput+="                           </dd>"
strOutput+="                           <dt onClick=\"javascript:montre('smenu3');\"><a href=\"APC_examining.html#Examining\">Skills Recognition</a> "
strOutput+="                           <dd id=\"smenu3\"> "
strOutput+="                             <ul>"
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_streamA.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Stream A Applicants</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_streamB.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Stream B Applicants</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_trained.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Australian and New &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Zealand Trained &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applicants</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_sittingexams.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Candidates Sitting APC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exams for Other &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Countries</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_forms.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Forms</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_feeschedule.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Fee Schedule</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_members.html#Examining\"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Examining Committee &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Members</b</a> </li>"

strOutput+="                             </ul>"
strOutput+="                           </dd>"
strOutput+="                           <dt onClick=\"javascript:montre('smenu4');\"><a href=\"APC_examining.html#EXAM\">Examinations</a> "
strOutput+="                           <dd id=\"smenu4\"> "
strOutput+="                             <ul>"
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_interns.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Written Examination for &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interns in Australia</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_streamA.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Stream A Applicants</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_streamB.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Stream B Applicants</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_trained.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Australian and New &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Zealand Trained &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applicants</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_sittingexams.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Candidates Sitting APC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exams for Other &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Countries</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_forms.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Forms</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_feeschedule.html#Examining\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Fee Schedule</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"examining_members.html#Examining\"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Examining Committee &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Members</b</a> </li>"
strOutput+="                             </ul>"
strOutput+="                           </dd>"
strOutput+="                           <dt><a href=\"APC_examination_result.html\">Examination Results</a> "

strOutput+="                           <dt onClick=\"javascript:montre('smenu5');\"><a href=\"accreditation_intro.html#Accreditation\">Accreditation</a> "
strOutput+="                           <dd id=\"smenu5\"> "
strOutput+="                             <ul>"
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"accreditation_accreditationcriteria.html#Accreditation\"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Accreditation Criteria, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Guidelines and procedures</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"accreditation_accreditatedpharmacyschools.html#Accreditation\"><b>&nbsp;&nbsp;&nbsp;&nbsp;Accredited Pharmacy &nbsp;&nbsp;&nbsp;&nbsp;Schools</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"accreditation_committee.html#Accreditation\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Accreditation Committee &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Members</b></a></li>"
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"APAC_authorisationprocess.html#Accreditation\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Authorisation to Accredit &nbsp;&nbsp;&nbsp;&nbsp; CPD </b></a></li>"
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"accreditation_CPDaccreditors.html#Accreditation\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Authorised CPD &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Accreditors </b></a>"
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"accreditation_ITP.html#Accreditation\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Intern Training Program &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Accreditation</b></a>"
strOutput+="                             </ul>"
strOutput+="                           </dd>"
strOutput+="                           <dt onClick=\"javascript:montre('smenu6');\"><a href=\"#FAQ\">FAQ</a> "
strOutput+="                           <dd id=\"smenu6\"> "
strOutput+="                             <ul>"
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"APC_skillsrecognitionFAQ.html#FAQ\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Skills Recognition FAQ</b></a> "
strOutput+="                               <li class=\"sidemene1\" onMouseOut=\"this.className='sidemene1'\" onMouseOver=\"this.className='sidemene2'\"><a href=\"APC_accreditationFAQ.html#FAQ\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Accreditation FAQ</b></a> </li>"
strOutput+="                           </ul>"
strOutput+="                           </dd>"
strOutput+="                           <dt onClick=\"javascript:montre('smenu7');\"><a href=\"APC_links.html\">Links</a> "
strOutput+="                         </dl>"
strOutput+="                       </div>"


document.getElementById("SIDE_MENU").innerHTML=strOutput

//alert(document.location)
//document.getElementById("smenu6").style.display='block';

}


function expandMenueForThisPage()
{
    var sPath=window.location;
    sPath = " " + sPath;
    if(sPath.indexOf("#")>0)
    {
      var sPage = sPath.substring(sPath.lastIndexOf("#") + 1) + "";
      for(i=0;i<myIDs.length;i++){
          if(myPages[i]==sPage){
              document.getElementById(myIDs[i]).style.display='block';
          }
      }
    }
}
//////////////////////////////////////////////////////SUBMIT DATA////////////////////////////////////////////////////////////////////////
function sendData(){
     //alert(document.title)
     //document.PageName.submit();
     get(document.getElementById('PageName'));
     //alert("Submit")
}
function submision(){return false;}
var http_request = false;
   function makePOSTRequest(url, parameters) {
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      http_request.onreadystatechange = alertContents;
      http_request.open('POST', url, true);
      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      http_request.setRequestHeader("Content-length", parameters.length);
      http_request.setRequestHeader("Connection", "close");
      http_request.send(parameters);
   }

   function alertContents() {
            //alert("Alert")
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
            //document.getElementById('myspan').innerHTML = result;
         } else {
           // alert('There was a problem with the request. ' + http_request.status);
         }
      }
   }

   function get(obj) {
      var poststr = "NameOfPage=" + encodeURI( document.getElementById("NP").value )
                    //"&mytextarea2=" + encodeURI( document.getElementById("mytextarea2").value );
      makePOSTRequest('http://pharmacycouncil.org.au/counter.php', poststr);
   }
/////////////////////////////////////////PRINT TNIRP\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
function doPrint(){
  d=window.open("",null,"height=600,width=800,status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes");
  d.document.write("<html><head><title>" + document.title + "</title><link href=\"css/print.css\" tppabs=\"\" type=\"text/css\" rel=\"stylesheet\" media=\"print\"></head><body>"+ document.getElementById("mainContent").innerHTML + "</body></html>");
  d.document.close()
  d.print()
}
/////////////////////////////////////////PRINT TNIRP\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
function informuser(){
	var strmessage=" ";
	strmessage+="<h3>Examination results are only available for the Stage I Examination and CAOP.\n\n"
	strmessage+="Overall results for the most recent session will be placed on the website: \n\n"
	strmessage+="Stage I Examination approximately 8 weeks after the examination\n\n"
	strmessage+="CAOP approximately 4 weeks after the examination \n\n"
	strmessage+="Results will remain on this website for a period of 4 weeks,\n after which time they will be removed.\n\n"
	strmessage+="Please Note: Previous examination results are not available on the website.\n</h3>"
	strmessage+="<a href=\"http://pharmacycouncil.org.au/APCGS/\"><p>Proceed</p><a>";	
	//alert(strmessage);
	document.getElementById("mainContent").innerHTML = strmessage;
}
