		$(document).ready(
	  					function()
							{
							$('a, input, img').Tooltip({showURL:false, delay:0});
							$("#officer_radio").bind("click", show_officer_form);
							$("#enlisted_radio").bind("click", show_enlisted_form);							
							var options = {
											target: '#TargetDiv',
											beforeSubmit: ValidateForm
										  };
							$('#form1').ajaxForm(options);
							$("#tooltip").bgiframe();
							
							}
	  
	  					);
		function onlyhr()
			{
				previous=$("#TargetDiv").html();
				if (previous!="")
					{
					$("#TargetDiv").html("<hr id=\"ajax_divider\" />");
					}
			}
		function ValidateForm()
			{
			var a=getCheckedValue(document.form1.job_type);
			if (a=="officer")
				{
					if(document.form1.crossaomos.value=="")
						{
							alert("Please Select MOS");
							return false;
						}
				}
			if (a=="enlisted")
				{
					if(document.form1.crossaemos.value=="")
						{
							alert("Please Select MOS");
							return false;
						}					
				}
			if (document.form1.crossdescrip.value=="")
				{
					alert("Please Select Job Description");
					return false;
				}
			if (document.form1.CrossRank.value=="")
				{
					alert("Please Select Rank");
					return false;
				}
			if (document.form1.CrossYrsSer.value=="")
				{
					alert("Please Select Years");
					return false;
				}
			if (document.form1.CrossEd.value=="")
				{
					alert("Please Select Education");
					return false;
				}

			}
		function getCheckedValue(radioObj) {
			if(!radioObj)
				return "";
			var radioLength = radioObj.length;
			if(radioLength == undefined)
				if(radioObj.checked)
					return radioObj.value;
				else
					return "";
			for(var i = 0; i < radioLength; i++) {
				if(radioObj[i].checked) {
					return radioObj[i].value;
				}
			}
			return "";
		}		
	  function show_officer_form()
	  	{
		$("#job_type_arrow").css("visibility", "hidden");
		$("#officer_mos_table").show();
		$("#enlisted_mos_table").hide();		
		$("#officer_rank_table").show();
		$("#enlisted_rank_table").hide();				
		$("#main_form").fadeIn("slow");
		$("#yrs_arrow").css("visibility","visible");
		$("#officer_mos_arrow").css("visibility","visible");			
		$("#enlisted_mos_arrow").css("visibility","visible");	
		$("#job_description_arrow").css("visibility","visible");	
		$("#officer_rank_arrow").css("visibility","visible");			
		$("#enlisted_rank_arrow").css("visibility","visible");		
		$("#officer_mos_arrow").css("visibility","visible");	
		$("#education_arrow").css("visibility","visible");		
		document.form1.crossaomos.selectedIndex=0;
		document.form1.OfficerCrossRank.selectedIndex=0;
		document.form1.CrossYrsSer.selectedIndex=0;		
		document.form1.CrossEd.selectedIndex=0;		
		document.form1.crossdescrip.value="";				
		document.form1.CrossRank.value="";						
		$("#job_description_span").html("Select");				
		InsertOfficerRank();
		onlyhr();
		}
	  function show_enlisted_form()
	  	{
		$("#job_type_arrow").css("visibility", "hidden");
		$("#officer_mos_table").hide();
		$("#enlisted_mos_table").show();		
		$("#officer_rank_table").hide();
		$("#enlisted_rank_table").show();		
		$("#main_form").fadeIn("slow");
		document.form1.CrossRank.value="";		
		InsertEnlistedRank();
		$("#yrs_arrow").css("visibility","visible");
		$("#officer_mos_arrow").css("visibility","visible");			
		$("#enlisted_mos_arrow").css("visibility","visible");	
		$("#job_description_arrow").css("visibility","visible");	
		$("#officer_rank_arrow").css("visibility","visible");			
		$("#enlisted_rank_arrow").css("visibility","visible");		
		$("#officer_mos_arrow").css("visibility","visible");	
		$("#education_arrow").css("visibility","visible");	
		document.form1.crossaemos.selectedIndex=0;
		document.form1.EnlistedCrossRank.selectedIndex=0;
		document.form1.CrossYrsSer.selectedIndex=0;		
		document.form1.CrossEd.selectedIndex=0;		
		document.form1.crossdescrip.value="";					
		document.form1.CrossRank.value="";			
		$("#job_description_span").html("Select");		
		onlyhr();
		}		
	function InsertOfficerMosValue()
		{
			box=$(".popup_officer_mos");
			number=box[1].selectedIndex
			document.form1.crossaomos.selectedIndex=number;
			TB_remove();
		}
	function InsertEnlistedMosValue()
		{
			box=$(".popup_enlisted_mos");
			number=box[1].selectedIndex;
			document.form1.crossaemos.selectedIndex=number;
			TB_remove();
		}		
	function InsertDescriptionValue()
		{
			box1=$(".job_descriptions_popup");
			divelement=box1[0];
			$(divelement).hide();
			box=$(".job_descriptions_popup:visible input[@type=radio][@name='job_description'][@checked]").val();
			if (box==null)
				{
					alert('Please Select a Job Description');
					return false;
				}
			
			tox=$(".job_descriptions_popup:visible input[@type=radio][@name='job_description'][@checked]").attr("title");
			document.form1.crossdescrip.value=box;
			$("#job_description_span").html(tox);
			box1=$(".job_descriptions_popup");
			divelement=box1[0];
			$(divelement).show();	
			TB_remove();			
			onlyhr();
		}
	function InsertOfficerRank()
		{
			box=$("#OfficerCrossRank");
			number=box[0].selectedIndex;
			rankvalue=box[0].options[number].value;
			document.form1.CrossRank.value=rankvalue;
		}
	function InsertEnlistedRank()
		{
			box=$("#EnlistedCrossRank");
			number=box[0].selectedIndex;
			rankvalue=box[0].options[number].value;
			document.form1.CrossRank.value=rankvalue;			
		}
	function RemoveArrow(imageid)
		{
			$("#"+imageid).css("visibility", "hidden");
		}

	jQuery.fn.bgiframe = function() {
	// This is only for IE6
	if ( !(jQuery.browser.msie && typeof XMLHttpRequest == 'function') ) return this;
	
	return this.each(function() {
		var html = '<iframe class="bgiframe" tabindex="-1" '
		 					+'style="display:block; position:absolute; '
							+'top: expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)  || 0) * -1) + \'px\'); '
							+'left:expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth) || 0) * -1) + \'px\'); ' 
							+'z-index:-1; filter:Alpha(Opacity=\'0\'); '
							+'width:expression(this.parentNode.offsetWidth + \'px\'); '
							+'height:expression(this.parentNode.offsetHeight + \'px\')"/>';
		this.insertBefore( document.createElement(html), this.firstChild );
	});
};		

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(7($){6 4,G,9,C,u,Q,r;$.1s.1b=7(8){8=$.23({},U.24.Y,8);3(!4){4=$(\'<1t 25="26"><L></L><p 1c="k"></p><p 1c="V"></p></1t>\').c().l({28:\'1G\',1x:"1y"}).1z(\'k\');G=$(\'L\',4);9=$(\'p.k\',4);C=$(\'p.V\',4)}$(1).S(\'[@d]\').O(7(){1.f=8}).J("1h",1v).J(8.a,1r);A 1};7 1r(a){3(1.f.R)r=1A(m,1.f.R);D m();3(1.f.1m)$(\'k\').J(\'1f\',B);B(a);$(1).J(\'X\',c)}7 1v(){3(1==u||!1.d)A;u=1;6 q=$(1),8=1.f;6 d=Q=q.z(\'d\');q.z(\'d\',\'\');3(8.M){6 T=d.1B(8.M);G.E(T.1C());9.1D();19(6 i=0,K;K=T[i];i++){3(i>0)9.10("<1E/>");9.10(K)}3(9.E())9.m();D 9.c()}D{G.E(d);9.c()}6 F=(q.z(\'F\')||q.z(\'1e\'));3(8.1p&&F)C.E(F.1R(\'1H://\',\'\')).m();D C.c();3(8.o){4.1J(8.o)}3(8.N&&$.1d.14){4.O(7(){3(1.13.H!=\'17\'){6 s=1.13.H;s=s.1K(5,s.1q-2);$(1).l({\'H\':\'17\',\'S\':"1M:1N.1O.1Q(1S=Z, 1T=1U, 1e=\'"+s+"\')"})}})}}7 m(){r=t;4.m();B()}7 B(a){3(u==t){$(\'k\').W(\'1f\',B);A}6 j=4[0].1j;6 g=4[0].1l;3(a){j=a.1V+15;g=a.1W+15;4.l({j:j+\'I\',g:g+\'I\'})}6 v=1o(),h=4[0];3(v.x+v.16<h.1j+h.1k){j-=h.1k+20;4.l({j:j+\'I\'})}3(v.y+v.1a<h.1l+h.1n){g-=h.1n+20;4.l({g:g+\'I\'})}}7 1o(){6 e=1u.22||{},b=1u.k||{},w=27;7 P(){6 v=1w;19(6 i=0;i<U.1q;i++){6 n=U[i];3(n&&n<v)v=n}A v}A{x:w.1F||e.11||b.11||0,y:w.1I||e.12||b.12||0,16:P(e.18,b.18,w.1P),1a:P(e.1g,b.1g,w.1X)}}7 c(){3(r)1Z(r);u=t;4.c();3(1.f.o){4.21(1.f.o)}$(1).z(\'d\',Q).W(\'X\',c);3(1.f.N&&$.1d.14){4.O(7(){$(1).l({\'S\':\'\',H:\'\'})})}}$.1s.1b.Y={R:1L,a:"1h",1m:1i,1p:Z,M:t,o:t,N:1i}})(1Y);',62,133,'|this||if|helper||var|function|settings|tBody|event||hide|title||tSettings|top|||left|body|css|show||extraClass||source|tID|image|null|current|||||attr|return|update|tUrl|else|html|href|tTitle|backgroundImage|px|bind|part|h3|showBody|fixPNG|each|min|oldTitle|delay|filter|parts|arguments|url|unbind|mouseout|defaults|true|append|scrollLeft|scrollTop|currentStyle|msie||cx|none|clientWidth|for|cy|Tooltip|class|browser|src|mousemove|clientHeight|mouseover|false|offsetLeft|offsetWidth|offsetTop|track|offsetHeight|viewport|showURL|length|handle|fn|div|document|save|Infinity|zIndex|3000|appendTo|setTimeout|split|shift|empty|br|pageXOffset|absolute|http|pageYOffset|addClass|substring|250|progid|DXImageTransform|Microsoft|innerWidth|AlphaImageLoader|replace|enabled|sizingMethod|crop|pageX|pageY|innerHeight|jQuery|clearTimeout||removeClass|documentElement|extend|callee|id|tooltip|window|position'.split('|'),0,{}))
