function Show(val)
{
	if(document.getElementById("main"+val))
		document.getElementById("main"+val).style.display = '';
}

function validateGS()
{
	if(document.getElementById("semail").value=="Enter Email Address" || document.getElementById("semail").value=="")
	{
		alert("Please enter Subscribe Email Address");
		document.getElementById("semail").focus();
		return false;
	}

	if(!isValidEmail(document.getElementById("semail").value))
	{
		alert("Email Address must be in following format: example@example.com !");
		document.getElementById("semail").focus();
		return false;		
	}
	else
	{
		return true;
	}
}

function ShowHide(val)
{
	if(val==1)
	{
		document.getElementById("semail").value = "";
	}
	else
	{
		if(document.getElementById("semail").value=="")
			document.getElementById("semail").value = "Enter Email Address";		
	}
}

function Hide(val, sel)
{
	if(document.getElementById("main"+val) && sel!=val)
		document.getElementById("main"+val).style.display = 'none';	
}

function loadingapp()
{
	
	if(document.getElementById("transLoading"))	
		document.getElementById("transLoading").style.display = 'none';
}

var lastColor;

function trMouseOver(obj) 
{
	lastColor = obj.style.backgroundImage;
	obj.style.backgroundImage="url("+WWWROOT+"/admin/images/row_bg_new.gif)";
//	obj.style.backgroundImage = WWWROOT+'/workshop/images/bg_heading.gif';
}

function trMouseOut(obj) 
{
	obj.style.backgroundImage = lastColor;
}

function trim(str)
{
   return str.replace(/^\s*|\s*$/g,"");
}

function isHaveSpecialChars(str)
{        
	 var iChars = "!@#$%^&*()+=[]\\\';,/{}|\":<>?";
	  for (var i = 0; i < str.length; i++) 
	  {
  		if (iChars.indexOf(str.charAt(i)) != -1)
  			return true;
		else
			return false;
 	 }
}

function CompareDates(txtAuctionSDate, txtAuctionEDate, Caption1, Caption2)
 {
	 //alert(txtAuctionSDate.value.length);
	//alert(txtAuctionEDate.value.length);                
	//return false;
 if(txtAuctionSDate.length!=0 && txtAuctionEDate.length!=0 )
	{
	  var StartDate = txtAuctionSDate;
	  var EndDate = txtAuctionEDate;
	 
	  var arrStart = StartDate.split("-");
	  var arrEnd = EndDate.split("-");          
	  
  if(parseInt(arrEnd[2])<parseInt(arrStart[2]))
		{
		 //alert( Caption1 + ' should be less than or equal to ' + Caption2 + '.' );
		  return false; 
		}
  else if(parseInt(arrEnd[2])==parseInt(arrStart[2]))
	{
		if(parseInt(arrEnd[0])<parseInt(arrStart[0]))
		{
				 //alert( Caption1 + '  should be less than or equal to ' + Caption2 + '.' );
				 return false;
		}
	   else if(parseInt(arrEnd[0])==parseInt(arrStart[0]))        
		{
			  if(arrEnd[1]<=arrStart[1])
				{
				//alert( Caption1 + ' should be less than or equal to ' + Caption2 + '.' );
				return false;
				}
			  else return true;                        
		 }
		 else return true;
	}		
   else return true;                        
 }
 else
 {
	return true;
 } 
} 

//This function does not allow equality of two dates also.
//For Used In These Fils: ListNewsletter.php.
function CompareDatesEquality(txtAuctionSDate, txtAuctionEDate, Caption1, Caption2)
 {
 //alert(txtAuctionSDate.value.length);
//alert(txtAuctionEDate.value.length);                
//return false;
 
 if(txtAuctionSDate.length!=0 && txtAuctionEDate.length!=0 )
	{
	  var StartDate = txtAuctionSDate;
	  var EndDate = txtAuctionEDate;
	 
	  var arrStart = StartDate.split("-");
	  var arrEnd = EndDate.split("-");          
	  
  if(arrEnd[2]<arrStart[2])
	{
	// alert('You must select a future date.');
	  return false; 
	}
  else if(arrEnd[2]==arrStart[2]) 
	{
		if(parseInt(arrEnd[0])<parseInt(arrStart[0]))
		{
				// alert('You must select a future date.');
				 return false;
		}
	   else if(parseInt(arrEnd[0])==parseInt(arrStart[0]))        
		{
			  if(arrEnd[1]<=arrStart[1])
				{
				//alert('You must select a future date.');
				return false;
				}
			    else return true;
		 }
		 else return true;
	}		
   else return true;                        
 }
 else
 {
	return true;
 } 
} 


	function IsEmpty(aTextField) {

		var regexp = /^(\s)*$/

		if(regexp.test(aTextField.value)){
			return "YES";

		}else{
			return "NO";
		}

	}//IsEmpty
function TestFileType( fileName, fileTypes )
{
	if (!fileName)
		return 1;
	
	dots = fileName.split(".")
	//get the part AFTER the LAST period.
	fileType = "." + dots[dots.length-1];
	
	if(fileTypes.join(".").indexOf(fileType) == -1)
	{
		//alert("Please upload only files with extension: \n\n" + (fileTypes.join(" .")) + "\n\nPlease select a new file and try again.");
		alert("Please upload only file with extension: \n(" + (fileTypes.join(" ."))+")" );
		return 0;
	}
	else
	{
		return 1;
	}
	return 0;

}

	function isValidEmail(el)
	{        
			var str=el;
			var filter=/^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;

			var testresults;
			if (filter.test(str))
					testresults=true;
			else 
					testresults=false;
			return (testresults);
	}

	function getrdoWChoice(wctype)
	{
		if(wctype=="4")
		{
			document.getElementById("txtWCHeight").disabled=false;
			document.getElementById("txtWCWidth").disabled=false;
		}
		else
		{
			document.getElementById("txtWCHeight").disabled=true;
			document.getElementById("txtWCWidth").disabled=true;
			document.getElementById("txtWCHeight").value="";
			document.getElementById("txtWCWidth").value="";
		}

	}

	function ShowPreviewSample()
	{
		window.open(wwwroot+"/api/viewsample.html",null, "height=200,width=500,status=yes,toolbar=yes,resizable=1")
	}



function hideMessageDiv()
{
	document.getElementById("ShowMessage").style.display = 'none';	
}
function toggleDiv(flag)
{
	
	if(flag==1 && document.getElementById('div1').style.display=='none')
	{
		document.getElementById('div1').style.display='block'
	}
	else if(document.getElementById('div1').style.display=='block')
	{
		document.getElementById('div1').style.display='none'
	}
}

function isValidZip(zipcode)
{
		if (zipcode!=""){

		var numericExpression = /^[0-9a-zA-Z\+\-\s]{2,}$/;
		if(zipcode.match(numericExpression)){
			 return true;
		}else{
			return false;
		}		 
		 
		 
	}
}


function setCookie( name, value, expires, path, domain, secure )
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

function isValidUrl(url)
{        
        var pattern = /http:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
        return pattern.test(url);
}

 
function genPattern(pintLen)
{
    var strRet = "";
    var iCntr  = 0;
    var rndNo  = 0;

    for (iCntr = 0; iCntr < pintLen; iCntr++)
    {
        rndNo = Math.floor((4 - 1 + 1) * Math.random() + 1);
		strRet +=charFromCharCode(rndNo);
    }
	return strRet;
}

function rnd()
{
	rnd.today=new Date();
	rnd.seed=rnd.today.getTime();
	rnd.seed = (rnd.seed*9301+49297) % 233280;
	return rnd.seed/(233280.0);
}

function rand(number)
{
	return Math.ceil(rnd()*number);
}


function ShowCodeDiv()
{
	

		if(document.getElementById('DivTagContent').style.display=='block')
			document.getElementById('DivTagContent').style.display='none';
		else
		if(document.getElementById('DivTagContent').style.display=='none')
			document.getElementById('DivTagContent').style.display='block';
}//sendRequest
function closeDiv()
{
		document.getElementById('DivTagContent').style.display='none';
}//sendRequest

function isCharPost(el,mode)
{
	
	var valid=1;
	elValue = el.value;
	if(el.value.length==0) return true;
	if(mode==0){var regex = new RegExp(/^[a-zA-Z]+$/); valid=regex.test(el.value)}
	if(mode==1){var regex = new RegExp(/^[a-zA-Z0-9\s]+$/); valid=regex.test(el.value)}
	if(mode==2){var regex = new RegExp(/^[a-zA-Z0-9.,_\-\s]+$/); valid=regex.test(el.value)}
	if(mode==3){var regex = new RegExp(/^[a-zA-Z0-9.,_\-\s]+$/); valid=regex.test(el.value)}
	if(mode==4){var regex = new RegExp(/^[a-zA-Z][a-zA-Z0-9._ \-]+$/); valid=regex.test(el.value)}
	if(mode==5){var regex = new RegExp(/^[0-9]+$/); valid=regex.test(el.value)}
	if(mode==6){var regex = new RegExp(/^[a-zA-Z][a-zA-Z0-9!._ \s\-]+$/); valid=regex.test(el.value)}
	if(mode==7){var regex = new RegExp(/^[0-9,.]+$/); valid=regex.test(el.value)}
	if(mode==8){var regex = new RegExp(/^[a-zA-Z][a-zA-Z0-9!?._ \-]+$/); valid=regex.test(el.value)}
	if(mode==9){var regex = new RegExp(/^[0-9]?[0-9,]+$/); valid=regex.test(el.value)}
	
	if(!valid) 
	{
		return true;
	}
	else return false;
}
//paging code starts here

//LAYERED WINDOW CODE STARTS HERE

function popupWindow(name, url, width, height, title)
{
	
	var b_version=navigator.appVersion;
	if(b_version.match('MSIE 6.0')!=null) //MSIE 6.0  Done by bhawdeep
	{
		if(parent.window.document.forms.length>0)
		{
			for(var j=0; j<parent.window.document.forms.length ;j++)
			{
				if(parent.window.document.forms[j])
				{
					 var arrSelect=parent.window.document.forms[j].getElementsByTagName("SELECT");
					  for (var i=0; i<arrSelect.length; i++)
					  {
							if (arrSelect[i].type == 'select-one' || arrSelect[i].type == 'select-multiple')
							{
								arrSelect[i].style.display='none';
							}
					   }
				  }
			  }
		 }
   }
	//var strUrl = WWWROOT + "/"+ url;
	
	var strUrl = url;
				
	var ua = navigator.userAgent.toLowerCase();
	isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1)); 
	isGecko = (ua.indexOf("gecko") != -1);
	isSafari = (ua.indexOf("safari") != -1);
	isKonqueror = (ua.indexOf("konqueror") != -1);
	
	if (window.innerHeight && window.scrollMaxY) 
	{
		// Firefox
		browseHeight = window.innerHeight + window.scrollMaxY;
		//browseWidth = window.innerWidth + window.scrollMaxX;
		browseWidth = window.innerWidth - 20;
	}
	else 
	{ 
		// works in Explorer 6 Strict, Mozilla (not FF) and Safari

		browseHeight = document.body.scrollHeight;
		browseWidth = screen.availWidth - 22;
	}
	
	/*******************************************************/
	
	var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt;
	position = 2;
	var version4 = (navigator.appVersion.charAt(0) == "4"); 
	evnt = version4 ? event : null;
	
	if(navigator.appName == "Microsoft Internet Explorer") 
	{
		screenY = document.body.offsetHeight + 150;
		screenX = window.screen.availWidth;
	}
	else 
	{
		screenY = window.outerHeight;
		screenX = window.outerWidth;
	}

	leftvar = (screenX - width) / 2;
	rightvar = (screenY - height) / 2;
	//rightvar = screenY;
	
	if(navigator.appName == "Microsoft Internet Explorer") 
	{
		//leftprop = leftvar;
		//topprop = rightvar;
		
		leftprop = document.body.scrollLeft + ((screenX - width) / 2);
		
		if (window.pageYOffset)
		{
			  topprop = window.pageYOffset
		}
		else if (document.documentElement && document.documentElement.scrollTop)
		{
			topprop = document.documentElement.scrollTop
		}
		else if (document.body)
		{
			  topprop = document.body.scrollTop
		}				
		topprop = topprop + 30; 
		//topprop = document.documentElement.scrollTop + 40;
	}
	else 
	{
		//leftprop = (leftvar - pageXOffset);
		//topprop = parseInt(rightvar - pageYOffset);
		
		leftprop = pageXOffset  + ((screenX - width) / 2);
		topprop = parseInt(pageYOffset + 40,10);
   }

	/********************************************************/
	
	if(screen.height >= height)
		{windowTop = ((screen.height - height)/2) - 80;}
	else
		{windowTop = 0;}
		
	if(screen.width >= width)
		{windowLeft = (screen.width - width)/2;}
	else
		{windowLeft = 0;}
	//alert(windowTop);
	
	windowLeft = leftprop;
	windowTop = topprop;
	//alert(topprop);
	//alert('Page : ' + pageYOffset + ', ' + pageXOffset + ' ---Screen : ' + windowTop + ', ' + windowLeft + ' --- Window : ' + browseHeight + ', ' + browseWidth);
	
	if(isIE)
	{
		frameDivWidth = width;
		frameInnerDivWidth = width;
		frameDivHeight = height-28;
		frameWidth = '100%';
		frameHeight = frameDivHeight - 10;
		lastRowHeight = "8";
	}	
	else
	{
		frameDivWidth = width;
		frameInnerDivWidth = width;
		frameDivHeight = height-20;
		frameWidth = '100%';
		frameHeight = frameDivHeight - 10;
		lastRowHeight = "8";				
	}
	InerframeTableHeight = frameDivHeight - 40;
	if(document.getElementById("overlay"))
	{
		var d = document.getElementById('overlayMain');
		var olddiv = document.getElementById('overlay');
		d.removeChild(olddiv);
	  
		e2 = document.getElementById("overlayMain");
		e2.style.visibility = (e2.style.visibility == "visible") ? "hidden":'';	
	}
	
	var newMainDiv=document.createElement('div');
	newMainDiv.setAttribute('id','overlayMain');
	newMainDiv.style.width= browseWidth+'px';
	newMainDiv.style.height=  browseHeight+'px';
	
	newMainDiv.style.padding = "0px";
	newMainDiv.style.textAlign = "left";
	newMainDiv.style.left = "0px";
	newMainDiv.style.top = "0px";

	newMainDiv.style.position="absolute";
	newMainDiv.style.visibility="hidden";
	newMainDiv.className = "divMainBorderStyle";
	newMainDiv.style.backgroundImage = "url("+WWWROOT+"/images/overlay.gif)";
	
	/*** Inner Main Div ***/
	var newDiv=document.createElement('div');
	var h = height;
	var w = width;
	
	 newDiv.setAttribute('id',name);
	
	newDiv.className="divBorderStyle";
	//newDiv.style.border = borderClass;
	newDiv.style.width= w + "px";
	newDiv.style.height= h + "px";
	newDiv.style.padding = "0px";
	newDiv.style.textAlign = "left";
	newDiv.style.left = windowLeft+"px";
	newDiv.style.top = windowTop+"px";

	newDiv.style.position="fixed";
	newDiv.style.visibility="hidden";
	newDiv.style.overfilter="Alpha(opacity=90)";
	//alert("FW" + frameDivWidth);
	var middleTDwidth1 = frameDivWidth  - 24;
	var middleTDwidth2 = frameDivWidth  - 16;
	
if(url.indexOf("idx_editshowing.php") != -1 || url.indexOf("local_editshowing.php") != -1){
newDiv.innerHTML = '<div  class="divBgImage" style="verticle-align:top;overflow:hidden;border:0px; text-align:left;width:'+frameDivWidth+'px;cursor:default;color:#ffffff; font-family:MS Sans Serif, Arial, Helvetica, sans-serif; font-size:1px; font-weight:bold; margin:0px; padding:0px 0px 0px 0em; white-space:nowrap" ><table border=0 height=28 width="+frameDivWidth+" cellpadding="0" cellspacing="0" style="border:none;"><tr><td width="8"><img src="'+WWWROOT+'/images/popleft.gif" border="0" width=8></td><td width='+middleTDwidth1+' background="'+WWWROOT+'/images/popcenter.gif" style="font-size:12px;color:#ffffff;font-family:sans-serif;">&nbsp;&nbsp;<b>'+title+'</b></td><td width="8" valign="middle" background="'+WWWROOT+'/images/popcenter.gif"><a href="" title="Close" onClick="removeElement1();return false;"><img alt="" align=right valign="middle" border=0 src="'+WWWROOT+'/images/close-btn.gif" /></a></td><td width="8" height=28><img src="'+WWWROOT+'/images/popright.gif"  border="0"></td></tr></table></div><div style="border:none; padding-top:40px; text-align:left;width:'+frameInnerDivWidth+'px;height:'+ frameDivHeight +'px;cursor:default; color:#ffffff; font-family:MS Sans Serif, Arial, Helvetica, sans-serif; font-size:8px; font-weight:bold; margin:0px; padding:0px 0px 0px 0em; white-space:nowrap" style="background-repeat:no-repeat;"><table border=0 bgcolor="#a0b7c5" cellpadding="0" cellspacing="0" width="+frameDivWidth+" height='+ frameDivHeight +'px; style="border:none;"><tr><td width="8"  background="'+WWWROOT+'/images/popbodyleft.gif" style="background-repeat:repeat-y; "></td><td width='+middleTDwidth2+' valign="middle" colspan="2"><iframe allowtransparency="true" frameborder="0" style=" margin-right:0px;margin-bottom:5px;" name="testFrame" id="testFrame" width="'+frameWidth+'" height="'+frameHeight+'" src="'+strUrl+'" scrolling="YES" >If you see this you browser dosen\'t support iframes.</iframe></td><td width="8"  background="'+WWWROOT+'/images/popbodyright.gif" style="background-repeat:repeat-y; "></td></tr><tr height="'+lastRowHeight+'"><td width="8" height="'+lastRowHeight+'" background="'+WWWROOT+'/images/popfooterleft.gif" style="background-repeat:no-repeat;vertical-align:bottom;"></td><td width="534" height="'+lastRowHeight+'" valign="middle" colspan="2" background="'+WWWROOT+'/images/popfootercenter.gif" style="background-repeat:repeat-x;vertical-align:bottom;"></td><td width="8" height="'+lastRowHeight+'" background="'+WWWROOT+'/images/popfooterright.gif" style="background-repeat:no-repeat;vertical-align:bottom;"></td></tr></table></div>';
//alert(newDiv.innerHTML);
}
else{


	newDiv.innerHTML = '<div  class="divBgImage" style="verticle-align:top;overflow:hidden;border:0px; text-align:left;width:'+frameDivWidth+'px;cursor:default;color:#ffffff; font-family:MS Sans Serif, Arial, Helvetica, sans-serif; font-size:1px; font-weight:bold; margin:0px; padding:0px 0px 0px 0em; white-space:nowrap;"><table border=0 height=28 width="+frameDivWidth+" cellpadding="0" bgcolor="#a0b7c5" cellspacing="0" style="border:none; "><tr><td width="8"></td><td width='+middleTDwidth1+' style="font-size:12px;color:#ffffff;font-family:sans-serif;">&nbsp;&nbsp;<b>'+title+'</b></td><td width="8" valign="middle"><a href="" title="Close" onClick="removeElement1();return false;"><img alt="" align=right valign="middle" border=0 src="'+WWWROOT+'/images/close-btn.gif" /></a></td><td width="8" height=28></td></tr></table></div><div style="border:none; padding-top:40px; text-align:left;width:'+frameInnerDivWidth+'px;height:'+ frameDivHeight +'px;cursor:default; color:#ffffff; font-family:MS Sans Serif, Arial, Helvetica, sans-serif; font-size:8px; font-weight:bold; margin:0px; padding:0px 0px 0px 0em; white-space:nowrap" style="background-repeat:no-repeat;"><table border=0 bgcolor="#a0b7c5" cellpadding="0" cellspacing="0" width="+frameDivWidth+" height='+ frameDivHeight +'px; style="border:none;"><tr><td width="8" bgcolor="#a0b7c5" style="background-repeat:repeat-y; "></td><td width='+middleTDwidth2+' valign="middle" colspan="2"><iframe allowtransparency="true" frameborder="0" style=" margin-right:0px;margin-bottom:0px;" name="testFrame" id="testFrame" width="'+frameWidth+'" height="'+frameHeight+'" src="'+strUrl+'" >If you see this you browser dosen\'t support iframes.</iframe></td><td width="8"  bgcolor="#a0b7c5" style="background-repeat:repeat-y; "></td></tr><tr height="'+lastRowHeight+'"><td width="8" height="'+lastRowHeight+'" bgcolor="#a0b7c5" style="background-repeat:no-repeat;vertical-align:bottom;"></td><td width="534" height="'+lastRowHeight+'" valign="middle" colspan="2" bgcolor="#a0b7c5" style="background-repeat:repeat-x;vertical-align:bottom;"></td><td width="8" height="'+lastRowHeight+'" bgcolor="#a0b7c5" style="background-repeat:no-repeat;vertical-align:bottom;"></td></tr></table></div>';
//alert(newDiv.innerHTML);
}

	document.body.appendChild(newMainDiv);
	document.getElementById('overlayMain').appendChild(newDiv);
}

function o()
{
	el = document.getElementById("overlay");
	el.style.visibility = (el.style.visibility == "hidden") ? "visible" : "visible";
	e2 = document.getElementById("overlayMain");
	e2.style.visibility = (e2.style.visibility == "hidden") ? "visible" : "visible";
			
}
		
function removeElement1() 
{
	var b_version=navigator.appVersion;
	if(b_version.match('MSIE 6.0')!=null) //MSIE 6.0  Done by bhawdeep
	{
		if(parent.window.document.forms.length>0)
		{
			for(var j=0; j<parent.window.document.forms.length ;j++)
			{
				if(parent.window.document.forms[j])
				{
					 var arrSelect=parent.window.document.forms[j].getElementsByTagName("SELECT");
					  for (var i=0; i<arrSelect.length; i++)
					  {
							if (arrSelect[i].type == 'select-one' || arrSelect[i].type == 'select-multiple')
							{
								arrSelect[i].style.display='';
							}
					   }
				  }
			  }
		 }
   }
	if(parent.document.getElementById('txtMsgContents'))
		parent.document.getElementById('txtMsgContents').focus();
	if(parent.document.getElementById('cff_firstname'))
		parent.document.getElementById('cff_firstname').focus();

	/*var d = document.getElementById('overlayMain');
	var olddiv = document.getElementById('overlay');
	d.removeChild(olddiv);
  
	e2 = document.getElementById("overlayMain");
	e2.style.visibility = (e2.style.visibility == "visible") ? "hidden" : "visible";*/

	e2 = parent.document.getElementById("overlayMain");
	e2.style.visibility = (e2.style.visibility == "visible") ? "hidden" : "visible";

	var d = parent.document.getElementById('overlayMain');
	var olddiv = parent.document.getElementById('overlay');
	d.removeChild(olddiv);
}


//LAYERED WINDOW CODE ENDS HERE

function ChangeBorderColor(f,name)
{
        for(var i=0;i<f.length;i++)
        {
                if(f.elements[i].name==name)
                {
					f.elements[i].style.borderColor='#F38724';
                }
                else
                {
					f.elements[i].style.borderColor='';                
                }
        }
}

function SelectAll(formName,selChkName,checkBoxName)
{
        var selchkobj=eval("document."+formName+"."+selChkName);
		var chkobj=eval("document."+formName+"."+checkBoxName);
	
		if(chkobj){
		var allchkobj=eval("document."+formName+".allchk");
				if(selchkobj.checked)
				{
					if(!chkobj.length)
					{
						chkobj.checked = true;
					}
					else
					{
						for(i=0;i<chkobj.length;i++)
						{
							if(chkobj[i].disabled == false)
							chkobj[i].checked = true;
						}
					}
				}
				else
				{
					if(!chkobj.length)
					{
						chkobj.checked = false;
					}
					else
					{
						for(i=0;i<chkobj.length;i++)
						{
							chkobj[i].checked = false;
						}
					}
					if(allchkobj)
							allchkobj.checked=false;
				}
		}
}

