function reset()
{
   document.forms[0].reset();
}

function changeImage(img,controlid)
{
    var srcControl;
	if(controlid == null)
	{
	    srcControl=event.srcElement;
	}
	else
	{
        srcControl=document.getElementById(controlid);
	}
	srcControl.src=img;
}

function openWindow(src,name,width,height,x,y,scroll)
{
    var attributes = '';
	if (width.length > 0) attributes = attributes + ',width=' + width;
	if (height.length > 0) attributes = attributes + ',height=' + height;
	if (x.length > 0) attributes = attributes + ',left=' + x;
	if (y.length > 0) attributes = attributes + ',top=' + y;
	attributes = attributes + ',scrollbars=' + (scroll==1?'yes':'no');
	attributes = attributes +',toolbar=no, menubar=no, resizable=no, location=no, status=no';
	attributes = attributes.substring(1,attributes.length);
    var cmsPopup =window.open (src, name,attributes);
    cmsPopup.focus();
}

function GetLeftWords(ctlLeftWords,ctlDetail,maxLength)
{
    var leftWord=document.getElementById(ctlLeftWords);
    var checkedBox=document.getElementById(ctlDetail);
    if(leftWord !=null && checkedBox != null)
    {
        if(checkedBox.value.length>maxLength)
        {
             checkedBox.value=checkedBox.value.substring(0,maxLength)
        }
        else
        {
             leftWord.value=maxLength-checkedBox.value.length;
        }
    }
}
function Reset()
{
    document.forms[0].reset();
}