function openProperties(formID, compID, propertysheetcontent,transfermethod) {
	var theForm = document.getElementById(formID+"Form");
	var propertyComponent = theForm.type.options[theForm.type.selectedIndex].value;
	if (compID+"PropertySheet" == propertyComponent) {
              if(transfermethod=='old')
                  window.open("pccprop.jsp?form="+formID+"Form&sectionid="+formID + "&compid="+compID+"&propertysheetcomponent="+propertyComponent+"&propertysheetcontent="+propertysheetcontent, "ComponentPropertySheet", "height=420,width=600,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
              else if(transfermethod=='new')
                  window.open("pccprop.jsp?form="+formID+"Form&sectionid="+formID + "&compid="+compID+"&propertysheetcomponent="+propertyComponent, "ComponentPropertySheet", "height=420,width=600,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
          } else
		window.open("pccprop.jsp?form="+formID+"Form&sectionid="+formID + "&compid="+compID+"&propertysheetcomponent="+propertyComponent+"&propertysheetcontent=", "ComponentPropertySheet", "height=420,width=600,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}


function toggleForm(formID) {
    	var vFormID = formID;
   	var DIVstyle = document.getElementById(vFormID+'_div').style;

	if (DIVstyle.display == 'none'){
		DIVstyle.display = 'block';
	}
	else {
		DIVstyle.display = 'none';
	}
}

function toggleCombinedForm(formID) {
	var vFormID = formID;
   	var editDIVstyle = document.getElementById(vFormID+'_edit_div').style;
	var taskDIVstyle = document.getElementById(vFormID+'_task_div').style;

	if (editDIVstyle.display == 'none'){
		editDIVstyle.display = 'block';
		taskDIVstyle.display = 'block';
	}
	else {
		editDIVstyle.display = 'none';
		taskDIVstyle.display = 'none';

	}
}

function submitComponentProperties(formID) {
	var theForm = document.getElementById(formID+"Form");
	var componentpropertysheet = theForm.type.options[theForm.type.selectedIndex].value;
	var component = componentpropertysheet.substring(0,componentpropertysheet.lastIndexOf('PropertySheet'));
	theForm.compid.value = component;
	theForm.uniquename.value = component + formID;
	theForm.submit();
}

function openStyleEditPage(xslPage,styleuuid,folderuuid) {
	if(styleuuid!='' && folderuuid!='') {
		window.open("showpage.jsp?page="+xslPage + "&edittype=EDIT&styleuuid="+styleuuid + "&folderuuid="+folderuuid,"ComponentXSL", "height=650,width=800,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	}
}
