if (document.getElementById){ //DynamicDrive.com change
	document.write('<style type="text/css">\n')
	document.write('.submenu{display: none;}\n')
	document.write('</style>\n')
}
function SwitchMenu(obj){
	if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
					if (ar[i].className=="submenu") //DynamicDrive.com change
						ar[i].style.display = "none";
			}
			el.style.display = "block";
		}
		else{
			el.style.display = "none";
		}
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*function selSwitch(btn)
{
   var i= btnType = 0;
   var isList1 = doIt = false;

   if (btn.value == "  >  " || btn.value == "  <  ") 
      btnType = 1;
   else if (btn.value == " >> " || btn.value == " << ") 
      btnType = 2;
   else
      btnType = 3;

   with (document.myForm)
   {
      isList1 = (btn.value.indexOf('>') != -1) ? true : false;     

      with ( ((isList1)? list1: list2) )
      {
         for (i = 0; i < length; i++)
         {
            doIt = false;
            if (btnType == 1)
            { 
               if(options[i].selected) doIt = true;
            }
            else if (btnType == 2)
            {
               doIt = true;
            } 
            else 
               if (!options[i].selected) doIt = true;
             
            if (doIt)
            {
               with (options[i])
               {
                  if (isList1)
                     list2.options[list2.length] 
                     = new Option( text, value );
                  else
                     list1.options[list1.length] 
                     = new Option( text, value );
               } 
               options[i] = null;
               i--;
            } 
            if(navigator.appName == "Netscape" ) 
              history.go(0);

         } // end for loop
         if (options[0] != null)
            options[0].selected = true;
      } // end with islist1
   } // end with document
}

function doSel(selObj)
{
   var i = 0;
   for (i = 0; i < selObj.length; i++)
      alert("The value is '" + selObj.options[i].value + "'");

}

function selsenSwitch(btn)
{
   var i= btnType = 0;
   var isList1 = doIt = false;

   if (btn.value == "  >  " || btn.value == "  <  ") 
      btnType = 1;
   else if (btn.value == " >> " || btn.value == " << ") 
      btnType = 2;
   else
      btnType = 3;

   with (document.myForm)
   {
      isList1 = (btn.value.indexOf('>') != -1) ? true : false;     

      with ( ((isList1)? lists1: secondarySkillslist) )
      {
         for (i = 0; i < length; i++)
         {
            doIt = false;
            if (btnType == 1)
            { 
               if(options[i].selected) doIt = true;
            }
            else if (btnType == 2)
            {
               doIt = true;
            } 
            else 
               if (!options[i].selected) doIt = true;
             
            if (doIt)
            {
               with (options[i])
               {
                  if (isList1)
                     secondarySkillslist.options[secondarySkillslist.length] 
                     = new Option( text, value );
                  else
                     lists1.options[lists1.length] 
                     = new Option( text, value );
               } 
               options[i] = null;
               i--;
            } 
            if(navigator.appName == "Netscape" ) 
              history.go(0);

         } // end for loop
         if (options[0] != null)
            options[0].selected = true;
      } // end with islists1
   } // end with document
}*/
function convertarray(){
	//alert("Hai");
	scriptAr = new Array();
   var i = 0;
   for (i = 0; i < document.choiceForm.choiceBox.length; i++)
     //alert("The value is '" + selObj.options[i].value + "'");
	 scriptAr[i] = document.choiceForm.choiceBox.options[i].value;
	 document.choiceForm.primarySkills.value = scriptAr.toString();
	 //alert("Hai");
	 scriptAr1 = new Array();
   var i = 0;
   for (i = 0; i < document.choiceForm.secondarySkillslist.length; i++)
     //alert("The value is '" + selObj.options[i].value + "'");
	 scriptAr1[i] = document.choiceForm.secondarySkillslist.options[i].value;
	 document.choiceForm.secondarySkills.value = scriptAr1.toString();
}
function moveOver()  
{
var boxLength = document.choiceForm.choiceBox.length;
var selectedItem = document.choiceForm.available.selectedIndex;
//alert(document.choiceForm.available.selectedIndex);
if(selectedItem < 0){
	//alert(selectedItem);
}else{
	if(document.choiceForm.choiceBox.length <=2 ){
var selectedText = document.choiceForm.available.options[selectedItem].text;
var selectedValue = document.choiceForm.available.options[selectedItem].value;
var i;
var isNew = true;
if (boxLength != 0) {
for (i = 0; i < boxLength; i++) {
thisitem = document.choiceForm.choiceBox.options[i].text;
if (thisitem == selectedText) {
isNew = false;
break;
      }
   }
} 
if (isNew) {
newoption = new Option(selectedText, selectedValue, false, false);
document.choiceForm.choiceBox.options[boxLength] = newoption;
}
document.choiceForm.available.selectedIndex=-1;
	}
	else{
	alert("Maximum of 3 primary skills allowed");
	}
}
}
function removeMe() {
var boxLength = document.choiceForm.choiceBox.length;
arrSelected = new Array();
var count = 0;
for (i = 0; i < boxLength; i++) {
if (document.choiceForm.choiceBox.options[i].selected) {
arrSelected[count] = document.choiceForm.choiceBox.options[i].value;
}
count++;
}
var x;
for (i = 0; i < boxLength; i++) {
for (x = 0; x < arrSelected.length; x++) {
if (document.choiceForm.choiceBox.options[i].value == arrSelected[x]) {
document.choiceForm.choiceBox.options[i] = null;
   }
}
boxLength = document.choiceForm.choiceBox.length;
   }
}
//
function moveOver1()  
{
var boxLength = document.choiceForm.secondarySkillslist.length;
var selectedItem = document.choiceForm.lists1.selectedIndex;
//alert(document.choiceForm.available.selectedIndex);
if(selectedItem < 0){
	//alert(selectedItem);
}else{
	
var selectedText = document.choiceForm.lists1.options[selectedItem].text;
var selectedValue = document.choiceForm.lists1.options[selectedItem].value;
var i;
var isNew = true;
if (boxLength != 0) {
for (i = 0; i < boxLength; i++) {
thisitem = document.choiceForm.secondarySkillslist.options[i].text;
if (thisitem == selectedText) {
isNew = false;
break;
      }
   }
} 
if (isNew) {
newoption = new Option(selectedText, selectedValue, false, false);
document.choiceForm.secondarySkillslist.options[boxLength] = newoption;
}
document.choiceForm.lists1.selectedIndex=-1;
	
}
}
function removeMe1() {
var boxLength = document.choiceForm.secondarySkillslist.length;
arrSelected = new Array();
var count = 0;
for (i = 0; i < boxLength; i++) {
if (document.choiceForm.secondarySkillslist.options[i].selected) {
arrSelected[count] = document.choiceForm.secondarySkillslist.options[i].value;
}
count++;
}
var x;
for (i = 0; i < boxLength; i++) {
for (x = 0; x < arrSelected.length; x++) {
if (document.choiceForm.secondarySkillslist.options[i].value == arrSelected[x]) {
document.choiceForm.secondarySkillslist.options[i] = null;
   }
}
boxLength = document.choiceForm.secondarySkillslist.length;
   }
}
