// JavaScript Document

<!--
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_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_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];}
}
//-->

/*
variable naming conventions in js file
prefix js_ with each variable and functions, this indicates javascript variable and functions
prefix int with variable of integer type
prefix flt with variable of float type
prefix str with variable of string type
prefix obj with variable of object type
prefix chr with variable of character type
prefix bol with variable of bool type
prefix dat with variable of datetime
prefix arr with variable of array type

functions naming conventins in js file
prefix fn with each function
*/
function showhide1(type,idname,visibility){
var cDiv=document.getElementsByTagName('DIV');
if (type == "ALL") 
{
  for (i=0; i < cDiv.length; i++)
   cDiv[i].style.display=visibility;
}
else
{
 if (document.getElementById(idname).style.display == "")
  document.getElementById(idname).style.display="none";
  else
  document.getElementById(idname).style.display="";
}
}
function showhide(type)
{
var cDiv=document.getElementsByTagName('DIV');


	for (i=0; i < cDiv.length; i++)
	{
		if(cDiv[i].id != "divMileStone")
			cDiv[i].style.display="none";
	}
	if (type != "")
	{
		if (type != "ALL") 
		{
		 if (document.getElementById(type).style.display == "")
		  document.getElementById(type).style.display="none";
		 else
		  document.getElementById(type).style.display="";

		}
	}
}

//function to format the number for two decimal number
function js_fnFormat(strText)
{
	//parameter description
	//strText->text needs to be format
	
	var js_arrNum
	js_arrNum=strText.split(".")
	if(js_arrNum.length==1)
		js_arrNum[0]=js_arrNum[0] + "." + "00"
	else
	{
		if(js_arrNum[1].length==1)
			js_arrNum[0]=js_arrNum[0] + "." + js_arrNum[1] + "0"
		else if(js_arrNum[1].length>=2)
			js_arrNum[0]=js_arrNum[0] + "." + js_arrNum[1].substr(0,2)
	}	
	return js_arrNum[0]
}

//function used to trim the trialing and leading spaces and 
function js_fnTrim(strText)
{
	//parameter description
	//strText -> text which needs to be trim the spaces
	
	var js_intIndex,js_strLen;
	js_intIndex=0
	strText += "";
	if(strText== "undefined" || strText == null)
		return null;
	else if(strText.length == 0)
		strText = "";
	else
	{
		js_strLen= strText.length;
		//this loop will trim the left side spaces
		while ((js_intIndex <= js_strLen) && (strText.charAt(js_intIndex) == " "))
			js_intIndex++;
		strText = strText.substring(js_intIndex, js_strLen);
		if(strText.length>0)
		{
			//this loop will trim the right side spaces
			js_intIndex= strText.length - 1;
			while ((js_intIndex >= 0) && (strText.charAt(js_intIndex) == " "))
				js_intIndex--;
			strText = strText.substring(0, js_intIndex + 1);
		}
	}
	return strText
}


//function to select or deselect the check boxes
function js_fnSelDesel(objMainobject,objSubobject)
{
	//objMainobject->Main check box object name passsed it as object
	//objSubobject->name of the sub check boxes passed it as string 
	//eg.,  ->  js_fnSelDesel(document.forms[0].chkAll,'chkAdd')
	
	for (intIndex=0;intIndex<document.forms[0].elements.length;intIndex++)
	{
		if(document.forms[0].elements[intIndex].type=="checkbox" && document.forms[0].elements[intIndex].name==objSubobject)
			document.forms[0].elements[intIndex].checked=objMainobject.checked
	}
}

//function to trim the form objects(textboxes,textarea)
function js_fnTrimFormObjects()
{
	//This function will list all the objects in the form
	//if the objects are of type textbox and textarea then it will be trimmed
	for (intIndex=0;intIndex<document.forms[0].elements.length;intIndex++)
	{
		if(document.forms[0].elements[intIndex].type=="text" || document.forms[0].elements[intIndex].type=="textarea")
			document.forms[0].elements[intIndex].value=js_fnTrim(document.forms[0].elements[intIndex].value)
	}
}

//function user to validate the number
function js_fnValidateNum(objName,strMessage,intStrLen,intZeroYesNo,intNegYesNo,intDecYesNo,intManYesNo)
{
	//parameter description
	//objName->name of the object
	//strMessage->short message
	//intStrLen->minimum characters to be enter
	//intZeroYesNo->value zero is allowed to not
	//if intZeroYesNo=0 -> we can allw value of zero 
	//if intZeroYesNo=1 -> value should be greater than zero
	//intNegYesNo->negative numbers allowed or not
	//if intNegYesNo=0 -> negative numbers are allowed
	//if intNegYesNo=1 -> negative numbers are not allowed
	//intDecYesNo->decimal numbers allowed or nott
	//intDecYesNo=0 -> decimal numbers are allowed
	//intDecYesNo=1 -> decimal numbers are allowed not allwed
	//intManYesNo->mandatory 
	//if intManYesNo=0 then it is mandatory
	//if intManYesNo=1 then it is optional
	
	if(objName.value=="" && intManYesNo==1)
		return true;
	else if(objName.value.length<intStrLen)
	{
		alert(strMessage+ " cannot be less than "+ intStrLen+ " characters");
		objName.focus();
		return false;
	}
	else if(isNaN(objName.value)==true)
	{
		alert(strMessage+"  is not a valid number");
		objName.focus();
		return false;
	}
	else if(intZeroYesNo==1 && parseFloat(objName.value)==0)
	{
		alert(strMessage+" cannot be zero");
		objName.focus();
		return false;
	}
	else if(intDecYesNo==1 && objName.value.indexOf(".")>-1)
	{
		alert("Decimal numbers not allowed");
		objName.focus();
		return false;
	}
	else if(intNegYesNo==1 && parseFloat(objName.value)<0)
	{
		alert("Negative numbers not allowed");
		objName.focus();
		return false;		
	}
	else if(objName.value.indexOf("+")>-1)
	{
		alert("+ sign is not allowed");
		objName.focus();
		return false;			
	}
	else if(objName.value.indexOf("e")>-1)
	{
		alert("e (exponential) is not allowed");
		objName.focus();
		return false;			
	}
	return true;
}

//function to validate the decimal numbers
//before calling this function call the fnValidateNum to validate the number
function js_fnDecimalNum(objName,strMessage,intIntPart,intDelpart)
{
	var ps_arrNumb
	ps_arrNumb=objName.value.split(".")
	if(ps_arrNumb[0].length>intIntPart)
	{
		alert("Integer part of " + strMessage + " cannot be more than " + intIntPart)
		objName.focus()
		return false
	}
	else if(ps_arrNumb.length>1 && ps_arrNumb[1].length>intDelpart)
	{
		alert("Decimal part of " + strMessage + " cannot be more than " + intDelpart)
		objName.focus()
		return false
	}
	return true;
}


//function to validate the alpha numeric
function js_fnValidateString(objName,strMessage,intManYesNo,intSplYesNo)
{
	//parameter description
	//objName->Name of the object
	//intManYesNo-> mandatory or optional
	//if intManYesNo=0-> mandatory
	//if intManYesNo=1->optional
	//intSplYesNo->special characters allowed or not
	//if intSplYesNo=0 -> special characters allowed
	//if intSplYesNo=1 -> special characters not allowed
	
	var js_strText,js_intIndex
	js_strText=objName.value
	js_strText=js_strText + ""
	if (js_strText == "undefined" || js_strText+"" == "null")
		return false;
	if(intManYesNo==1 && js_strText=="")
		return true
	else if(intManYesNo==0 && js_strText=="")
	{
		alert(strMessage + " cannot be blank")
		objName.focus();
		return false;
	}
    else
	{
		for (js_intIndex = 0; js_intIndex < js_strText.length; js_intIndex++)
		{
			if(intSplYesNo==1)
			{
				if (!( ((js_strText.charAt(js_intIndex) >= "0") && (js_strText.charAt(js_intIndex) <= "9")) || (js_strText.charAt(js_intIndex) == "_") ||
						((js_strText.charAt(js_intIndex) >= "a") && (js_strText.charAt(js_intIndex) <= "z")) ||
						((js_strText.charAt(js_intIndex) >= "A") && (js_strText.charAt(js_intIndex) <= "Z"))
						) )
					{
						alert("Only alphanumeric characters are allowed")
						objName.focus();
						return false;
					}
			}
		}
	}
	 return true;
}

function js_fnValidateString2212(objName,strMessage,intManYesNo,intSplYesNo)
{
	//parameter description
	//objName->Name of the object
	//intManYesNo-> mandatory or optional
	//if intManYesNo=0-> mandatory
	//if intManYesNo=1->optional
	//intSplYesNo->special characters allowed or not
	//if intSplYesNo=0 -> special characters allowed
	//if intSplYesNo=1 -> special characters not allowed
	
	var js_strText,js_intIndex
	js_strText=objName.value
	js_strText=js_strText + ""
	if (js_strText == "undefined" || js_strText+"" == "null")
		return false;
	if(intManYesNo==1 && js_strText=="")
		return true
	else if(intManYesNo==0 && js_strText=="")
	{
		alert(strMessage + " cannot be blank")
		objName.focus();
		return false;
	}
    else
	{
		//for (js_intIndex = 0; js_intIndex < js_strText.length; js_intIndex++)
		//{
			if(intSplYesNo==1)
			{
				if (!( ((js_strText.charAt(1) >= "a") && (js_strText.charAt(1) <= "z")) ||
						((js_strText.charAt(1) >= "A") && (js_strText.charAt(1) <= "Z"))
						) )
					{
						alert("Invalid Name Entry")
						objName.focus();
						return false;
					}
			}
		//}
	}
	 return true;
}


//function to validate the email address
function js_fnEmail(objName,intManYesNo)
{
	
	//parameter description
	//objName -> name of the object
	//if intManYesNo=0-> mandatory
	//if intManYesNo=1->optional

	if(objName.value=="" && intManYesNo==1)
		return true;
	else if(objName.value=="" && intManYesNo==0)
	{
		alert("Enter a valid email")
		objName.focus()
		return false;
	}
	else
	{
		var js_intIndex,js_chrText,js_bolDot,js_bolAt,js_intAtPos,js_intDotPos
		js_bolDot = "false";
		js_bolAt = "false";
		js_intAtPos=0;
		js_intDotPos=0;
		for(js_intIndex=0;js_intIndex<objName.value.length; js_intIndex++)
		{
			js_chrText=objName.value.charAt(js_intIndex)
			if(js_chrText==" ")
			{
				alert("Spaces not allowed")
				objName.focus()
				return false;
			}
			else if(js_chrText=="'" || js_chrText=="\"")
			{
				alert("Single and Double quotes are not allowed")
				objName.focus()
				return false;
			}
			else if(js_intIndex==0 && (js_chrText == "@" || js_chrText == "."))
			{
				alert("Invalid email")
				objName.focus()
				return false;
			}
			else if (js_intIndex!=0 && js_chrText == "@")
			{
				js_intAtPos=js_intIndex
				js_bolAt="true"
			}
			else if (js_intIndex!=0 && js_chrText == ".")
			{
				js_intDotPos=js_intIndex
				js_bolDot="true"
			}

		}
		if(objName.value.length<5 || js_bolAt!="true" || js_bolDot!="true" || (parseFloat(js_intDotPos)-parseFloat(js_intAtPos+1))<1 || (parseFloat(objName.value.length)-parseFloat(js_intDotPos+1))<1)
		{
			alert("Invalid email")
			objName.focus()
			return false;
		}	
		return true;
	}
}


//function to replace space with plus sign
function js_fnReplaceSpace(strText)
{
	var js_intIndex=0;
	var js_charText,strText1
	strText1=""
	if(strText.length==0 || strText =="null")
		return "";
	else
	{
		for(js_intIndex=0;js_intIndex<strText.length;js_intIndex++)
		{
			js_charText = strText.substring(js_intIndex,js_intIndex+1)
			if(js_charText==" ")
				js_charText = "+"
			strText1 += js_charText
		}
		return strText1;
	}
}


//this function validates the input date against the current date and it should be less than the current date
function js_fnCompareCurrentDate1(objMonth,objDay,objYear,datCurDate,strMessage)
{
	//parameter description
	//objMonth->Object name of month
	//objDay->object name of the day
	//objYear->object name of the year
	//strMessage-> message to be displayed

	var js_datInput,js_datCurDate
	js_datInput=objMonth.options[objMonth.selectedIndex].text + "/" + objDay.options[objDay.selectedIndex].text + "/" + objYear.options[objYear.selectedIndex].text
	js_datInput=new Date(js_datInput)
	js_datCurDate=new Date(datCurDate)
	if(js_datInput.getTime()>js_datCurDate.getTime())
	{
		alert(strMessage + " Should be less than current date")
		objMonth.focus()
		return false
	}
	return true
}

//this function validates the input date against the current date and it should not be less than the current date
function js_fnCompareCurrentDate(objMonth,objDay,objYear,datCurDate,strMessage)
{
	//parameter description
	//objMonth->Object name of month
	//objDay->object name of the day
	//objYear->object name of the year
	//strMessage-> message to be displayed

	var js_datInput,js_datCurDate
	js_datInput=objMonth.options[objMonth.selectedIndex].text + "/" + objDay.options[objDay.selectedIndex].text + "/" + objYear.options[objYear.selectedIndex].text
	js_datInput=new Date(js_datInput)
	js_datCurDate=new Date(datCurDate)
	/*if(js_datInput.getMonth()<js_datCurDate.getMonth())
	{		
		alert(strMessage + " Should not be less than current date(month)")
		objMonth.focus()
		return false
	}
	else if(js_datInput.getDate()<js_datCurDate.getDate())
	{		
		alert(strMessage + " Should not be less than current date(day)")
		objDay.focus()
		return false
	}
	if(js_datInput.getYear()<js_datCurDate.getYear())
	{		
		alert(strMessage + " Should not be less than current date(year)")
		objYear.focus()
		return false
	}*/
	if(js_datInput.getTime()<js_datCurDate.getTime())
	{
		alert(strMessage + " Should be greater than current date")
		objMonth.focus()
		return false
	}
	return true
}

//this function will compare two dates
//if first date is greater than second date than it will return false other wise true
function js_fnCompareDates(objMonth1,objDay1,objYear1,objMonth2,objDay2,objYear2)
{
	//parameter description
	//objMonth1->Object name of month for the first date
	//objDay1->object name of the day for the first date
	//objYear1->object name of the year for the first date
	//objMonth2->Object name of month for the second date
	//objDay2->object name of the day for the second date
	//objYear2->object name of the year for the second date
	var js_datInput1,js_datInput2
	js_datInput1=new Date(objMonth1.options[objMonth1.selectedIndex].text + " /" + objDay1.options[objDay1.selectedIndex].text + "/" + objYear1.options[objYear1.selectedIndex].text)
	js_datInput2=new Date(objMonth2.options[objMonth2.selectedIndex].text + " /" + objDay2.options[objDay2.selectedIndex].text + "/" + objYear2.options[objYear2.selectedIndex].text)

	if(js_datInput1.getTime()>js_datInput2.getTime())
	{
		alert("From date must be less than or equal to current date")
		objMonth1.focus()
		return false
	}
	return true
}

//this function will compare two values for the combo box if they match then 
//it will return index which need to be selected
function js_fnSelected(objName,strComstring)
{
	//parameter description
	//objName->Name of the object which need to checked
	//strComstring->the string which is to be compare with the combo value
	var js_intIndex=new String()
	for(js_intIndex=0;js_intIndex<objName.length;js_intIndex++)
	{
		if(objName.options[js_intIndex].value==strComstring)
			return js_intIndex
	}
}
//function to show current date on the listbox
function js_fnCurrentDate(objMonth,iMonth,objDay,iDay,objYear,iYear)
	{
		//parameter description
		//objMonth->month lstbox
		//objDay->day lstbox
		//objYear->year lstbox
		//iMonth->current server month
		//iDay->current server day
		//iYear->current server year

		objMonth.selectedIndex=parseInt(iMonth)-1
		objDay.selectedIndex=parseInt(iDay)-1
		objYear.selectedIndex=parseInt(iYear)-1
	}
	
//function to navigate
function js_fnNavigate(sUrl)
	{
		document.forms[0].method = "post";
		document.forms[0].action = sUrl;	
		document.forms[0].submit();
		return false;  
	}	
function fnNewWin1(winUrl)
	{
		var newWin=window.open(winUrl,"","toolbar=0,location=0,menubar=0,scrollbars=1,width=450,height=200")
	}

function IsDateValid(strDate, chrFormat)
{	var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/;
	var matchArray = strDate.match(datePat);
	var intMonth;
	var intDay;
	var intYear;
	if (matchArray == null)
	{return(false);}
	// If the format is "m" then validate for "mm/dd/yyyy" format
	if ((chrFormat == 'm') || (chrFormat == 'M'))
	{
		intMonth = matchArray[1];
		intDay = matchArray[3];
		intYear = matchArray[4];
	}
	else
	// else validate for "dd/mm/yyyy" format
	{intMonth = matchArray[3];
	 intDay = matchArray[1];
	 intYear = matchArray[4];}

	if ((intMonth < 1 || intMonth > 12) || (intDay < 1 || intDay > 31) ||
		((intMonth==4 || intMonth==6 || intMonth==9 || intMonth==11) && intDay==31))
	{return(false);}
	if (intMonth == 2)
	{// check for february 29th
	 var blnIsLeap = (intYear % 4 == 0 && (intYear % 100 != 0 || intYear % 400 == 0));
	 if (intDay > 29 || (intDay == 29 && !blnIsLeap))
	   {return(false);}
	}
	return(true);
}

/*====================================================================================================*/

function showhide1(type,idname,visibility)
{
	var cDiv=document.getElementsByTagName('DIV');
	if (type == "ALL") 
	{
	  for (i=0; i < cDiv.length; i++)
	   cDiv[i].style.display=visibility;
	}
	else
	{
	 if (document.getElementById(idname).style.display == "")
	  document.getElementById(idname).style.display="none";
	  else
	  document.getElementById(idname).style.display="";
	}
}

function show_sub()
{
	var temp1 = document.getElementById("prof_services")
	var temp2 = document.getElementById("minus")
	var temp3 = document.getElementById("plus")
	var temp4 = document.getElementById("prof1")
	var temp5 = document.getElementById("prof2")

	temp1.style.display = ""
	temp2.style.display = ""
	temp3.style.display = "none"
	temp4.style.display = "none"
	temp5.style.display = ""
}

function hide_sub()
{
	var temp1 = document.getElementById("prof_services")
	var temp2 = document.getElementById("minus")
	var temp3 = document.getElementById("plus")
	var temp4 = document.getElementById("prof1")
	var temp5 = document.getElementById("prof2")

	temp1.style.display = "none"
	temp2.style.display = "none"
	temp3.style.display = ""
	temp4.style.display = ""
	temp5.style.display = "none"
}

function MM_openBrWindow(theURL,winName,features)
{ //v2.0
  win=window.open(theURL,"my_win",features);
  win.focus();
}
function closeDep() {
  if (win && win.open && !win.closed) win.close();
}


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)
{ //v3.0
  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); 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];
   }
}
var br
		if(navigator.appName == 'Netscape' && document.layers != null){br="N";}
		else if(navigator.appName == 'Microsoft Internet Explorer' && document.all != null){br="IE";}
		else{br=null}

		function MM_findObj(n, d) { //v4.0
		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 && document.getElementById) x=document.getElementById(n); return x;
		}

function MM_showHideLayers()
{
	//v3.0

	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3)
	{
		if ((obj=MM_findObj(args[i]))!=null)
		{
			v=args[i+2];
			if (obj.style)
			{
				obj=obj.style;
				v=(v=='show')?'visible':(v='hide')?'hidden':v;
			}

			obj.visibility=v;
		}
	}
}
function mOvr(src,clrOver){
  if (!src.contains(event.fromElement)) {
  src.style.cursor = 'hand';
  src.bgColor = clrOver;
  src.children.tags('A')[0].style.color = 'ffffff';
  }
}

function mOut(src,clrIn){
  if (!src.contains(event.toElement)) {
  src.style.cursor = 'default';
  src.bgColor = clrIn;
  src.children.tags('A')[0].style.color = 'ffffff';
  }
}

function mOut2 (src,clrIn){
  if (!src.contains(event.toElement)) {
  src.style.cursor = 'default';
  src.bgColor = clrIn;
  src.children.tags('A')[0].style.color = '75519C';
  }
}
function mClk(src){
  if(event.srcElement.tagName=='TD') 
        {
        src.children.tags('A')[0].click();
  }
}

function openPI() {
  pi=window.open('pi.pdf','pi', config='width=800,height=600,toolbar=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes');
}

function fnReset()
{
	var intIndex=0;
	for (intIndex=0;intIndex<document.forms[0].elements.length;intIndex++)
	{	
		
		if (document.forms[0].elements[intIndex].type=="text")
		{
			document.forms[0].elements[intIndex].value="";
		}
		if (document.forms[0].elements[intIndex].type=="password")
		{
			document.forms[0].elements[intIndex].value="";
		}
		if (document.forms[0].elements[intIndex].type=="textarea")
		{
			document.forms[0].elements[intIndex].value="";			
		}
		if(document.forms[0].elements[intIndex].type=="checkbox" )
		{
			document.forms[0].elements[intIndex].checked=false;						
		}
		if(document.forms[0].elements[intIndex].type=="radio" )
		{
			document.forms[0].elements[intIndex].checked=false;
		}
		if(document.forms[0].elements[intIndex].type=="select-one" )
		{
			document.forms[0].elements[intIndex].value=0;
		}			
	}
	return false;
}

function fnReset1()
{
	var intIndex=0;
	for (intIndex=0;intIndex<document.forms[0].elements.length;intIndex++)
	{	
		
		if (document.forms[0].elements[intIndex].type=="text")
		{
			document.forms[0].elements[intIndex].value="";
		}
		if (document.forms[0].elements[intIndex].type=="password")
		{
			document.forms[0].elements[intIndex].value="";
		}
		if (document.forms[0].elements[intIndex].type=="textarea")
		{
			document.forms[0].elements[intIndex].value="";			
		}
		if(document.forms[0].elements[intIndex].type=="checkbox" )
		{
			document.forms[0].elements[intIndex].checked=false;						
		}
		if(document.forms[0].elements[intIndex].type=="radio" )
		{
			document.forms[0].elements[intIndex].checked=false;
		}
		 
	}
	return false;
}
function openwin2(winUrl)
		{
	my_window = window.open(winUrl,"",config="toolbar=0,location=0,top="+parseInt(window.screen.height)* (1/100)+",left="+parseInt(window.screen.width)* (1/100)+",menubar=0,scrollbars=0,width=550,height=430,resizable=0")
	return false;
	}

